@kth/style 0.16.3 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kth/style",
3
- "version": "0.16.3",
3
+ "version": "0.17.0",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "exports": {
@@ -83,7 +83,8 @@ $icon-size: calc(#{spacing.$space-24} + 2 * var(--space-inner-icon));
83
83
  }
84
84
  }
85
85
 
86
- .kth-button.back {
86
+ .kth-button.back,
87
+ .kth-button.menu {
87
88
  padding: spacing.$space-8 0;
88
89
  gap: spacing.$space-4;
89
90
  color: var(--color-tertiary);
@@ -94,6 +95,13 @@ $icon-size: calc(#{spacing.$space-24} + 2 * var(--space-inner-icon));
94
95
  }
95
96
  }
96
97
 
98
+ .kth-button.menu::before {
99
+ @include icons.icon-menu;
100
+ width: 20px;
101
+ height: 20px;
102
+ background-color: var(--color-tertiary);
103
+ }
104
+
97
105
  .kth-button.back::before {
98
106
  @include icons.icon-arrow-back;
99
107
  width: 20px;
@@ -0,0 +1,76 @@
1
+ @use "../tokens/colors.scss";
2
+ @use "../tokens/spacing.scss";
3
+ @use "../utils/mixins.scss";
4
+ @use "../tokens/typography";
5
+ @use "../tokens/sizing.scss";
6
+ @use "../tokens/icons";
7
+
8
+ @layer kth-style {
9
+ .kth-local-navigation,
10
+ .kth-local-navigation--mobile {
11
+ h2 {
12
+ @include typography.font-heading-s;
13
+ margin-inline-start: spacing.$space-24;
14
+ margin-block-start: spacing.$space-12;
15
+ margin-block-end: spacing.$space-4;
16
+ }
17
+
18
+ h3,
19
+ h4,
20
+ h5 {
21
+ @include typography.font-heading-xs;
22
+ margin-block: spacing.$space-8;
23
+ }
24
+
25
+ ul {
26
+ list-style: none;
27
+ padding: 0;
28
+ margin: 0;
29
+ margin-inline-start: spacing.$space-8;
30
+ }
31
+
32
+ &__submenu {
33
+ margin-inline-start: spacing.$space-16;
34
+ }
35
+
36
+ &__submenu ul {
37
+ margin-inline-start: 0;
38
+ }
39
+
40
+ a:not(.kth-button) {
41
+ text-decoration: none;
42
+ display: flex;
43
+ padding-block: spacing.$space-8;
44
+ padding-inline-start: spacing.$space-16;
45
+ }
46
+
47
+ a:hover {
48
+ text-decoration: underline;
49
+ text-underline-offset: 3px;
50
+ }
51
+
52
+ a.expandable {
53
+ justify-content: space-between;
54
+ }
55
+
56
+ a.expandable::after {
57
+ @include icons.icon-caret-right;
58
+ background-color: var(--color-tertiary);
59
+ align-self: center;
60
+ }
61
+
62
+ a[aria-current="page"] {
63
+ position: relative;
64
+
65
+ &::before {
66
+ content: "";
67
+ position: absolute;
68
+ left: 0;
69
+ top: 0;
70
+ bottom: 0;
71
+ width: spacing.$space-4;
72
+ background-color: var(--color-primary);
73
+ }
74
+ }
75
+ }
76
+ }
@@ -18,6 +18,11 @@
18
18
  border: 0;
19
19
  overflow-y: auto;
20
20
 
21
+ &.left {
22
+ left: 0;
23
+ right: auto;
24
+ }
25
+
21
26
  &__navigation {
22
27
  height: 60px;
23
28