@oslokommune/punkt-css 17.0.5 → 17.0.7

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.
Files changed (125) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/css/components/alert.css +3 -3
  3. package/dist/css/components/alert.min.css +1 -1
  4. package/dist/css/components/badge.css +2 -2
  5. package/dist/css/components/badge.min.css +1 -1
  6. package/dist/css/components/breadcrumbs.css +1 -1
  7. package/dist/css/components/breadcrumbs.min.css +1 -1
  8. package/dist/css/components/calendar.css +2 -2
  9. package/dist/css/components/calendar.min.css +1 -1
  10. package/dist/css/components/card.css +12 -12
  11. package/dist/css/components/card.min.css +1 -1
  12. package/dist/css/components/combobox.css +3 -3
  13. package/dist/css/components/combobox.min.css +1 -1
  14. package/dist/css/components/datepicker.css +7 -10
  15. package/dist/css/components/datepicker.min.css +1 -1
  16. package/dist/css/components/fileupload.css +16 -16
  17. package/dist/css/components/fileupload.min.css +1 -1
  18. package/dist/css/components/footer.css +6 -7
  19. package/dist/css/components/footer.min.css +1 -1
  20. package/dist/css/components/header-global.css +7 -7
  21. package/dist/css/components/header-global.min.css +1 -1
  22. package/dist/css/components/header-menu.css +20 -20
  23. package/dist/css/components/header-menu.min.css +1 -1
  24. package/dist/css/components/header-service-mobile.css +3 -3
  25. package/dist/css/components/header-service-mobile.min.css +1 -1
  26. package/dist/css/components/header-service.css +9 -9
  27. package/dist/css/components/header-service.min.css +1 -1
  28. package/dist/css/components/header-user-menu.css +3 -3
  29. package/dist/css/components/header-user-menu.min.css +1 -1
  30. package/dist/css/components/header.css +8 -9
  31. package/dist/css/components/header.min.css +1 -1
  32. package/dist/css/components/heading.css +1 -2
  33. package/dist/css/components/heading.min.css +1 -1
  34. package/dist/css/components/linkcard.css +4 -4
  35. package/dist/css/components/linkcard.min.css +1 -1
  36. package/dist/css/components/listbox.css +7 -7
  37. package/dist/css/components/listbox.min.css +1 -1
  38. package/dist/css/components/loader.css +1 -1
  39. package/dist/css/components/loader.min.css +1 -1
  40. package/dist/css/components/messagebox.css +2 -2
  41. package/dist/css/components/messagebox.min.css +1 -1
  42. package/dist/css/components/modal.css +7 -7
  43. package/dist/css/components/modal.min.css +1 -1
  44. package/dist/css/components/preview.css +6 -6
  45. package/dist/css/components/preview.min.css +1 -1
  46. package/dist/css/components/progressbar.css +3 -3
  47. package/dist/css/components/progressbar.min.css +1 -1
  48. package/dist/css/components/searchinput.css +2 -2
  49. package/dist/css/components/searchinput.min.css +1 -1
  50. package/dist/css/components/stepper.css +4 -4
  51. package/dist/css/components/stepper.min.css +1 -1
  52. package/dist/css/components/tabs.css +1 -1
  53. package/dist/css/components/tabs.min.css +1 -1
  54. package/dist/css/components/tag.css +2 -2
  55. package/dist/css/components/tag.min.css +1 -1
  56. package/dist/css/components/timepicker.css +8 -9
  57. package/dist/css/components/timepicker.min.css +1 -1
  58. package/dist/css/elements/checkbox-radio.css +4 -4
  59. package/dist/css/elements/checkbox-radio.min.css +1 -1
  60. package/dist/css/elements/form.css +1 -1
  61. package/dist/css/elements/form.min.css +1 -1
  62. package/dist/css/elements/list.css +3 -3
  63. package/dist/css/elements/list.min.css +1 -1
  64. package/dist/css/elements/section.css +2 -2
  65. package/dist/css/elements/section.min.css +1 -1
  66. package/dist/css/elements/table.css +1 -1
  67. package/dist/css/elements/table.min.css +1 -1
  68. package/dist/css/pkt-base.css +13219 -13223
  69. package/dist/css/pkt-base.min.css +1 -1
  70. package/dist/css/pkt-components.css +150 -157
  71. package/dist/css/pkt-components.min.css +1 -1
  72. package/dist/css/pkt-docs.css +13358 -13369
  73. package/dist/css/pkt-docs.min.css +1 -1
  74. package/dist/css/pkt-elements.css +11 -11
  75. package/dist/css/pkt-elements.min.css +1 -1
  76. package/dist/css/pkt-grid.css +2232 -0
  77. package/dist/css/pkt-grid.min.css +1 -0
  78. package/dist/css/pkt-tokens.css +273 -0
  79. package/dist/css/pkt-tokens.min.css +1 -0
  80. package/dist/css/pkt-utilities.css +11335 -0
  81. package/dist/css/pkt-utilities.min.css +1 -0
  82. package/dist/css/pkt.css +13362 -13373
  83. package/dist/css/pkt.min.css +1 -1
  84. package/dist/scss/base/_colors-tokens.scss +106 -0
  85. package/dist/scss/base/_colors-utilities.scss +43 -0
  86. package/dist/scss/base/_colors.scss +2 -144
  87. package/dist/scss/base/_containers.scss +4 -8
  88. package/dist/scss/base/_index.scss +10 -3
  89. package/dist/scss/components/_alert.scss +3 -3
  90. package/dist/scss/components/_badge.scss +2 -2
  91. package/dist/scss/components/_breadcrumbs.scss +1 -1
  92. package/dist/scss/components/_calendar.scss +2 -2
  93. package/dist/scss/components/_card.scss +12 -12
  94. package/dist/scss/components/_combobox.scss +3 -3
  95. package/dist/scss/components/_datepicker.scss +6 -8
  96. package/dist/scss/components/_fileupload.scss +16 -16
  97. package/dist/scss/components/_footer.scss +5 -6
  98. package/dist/scss/components/_header-global.scss +7 -7
  99. package/dist/scss/components/_header-menu.scss +8 -8
  100. package/dist/scss/components/_header-service-mobile.scss +3 -3
  101. package/dist/scss/components/_header-service.scss +9 -9
  102. package/dist/scss/components/_header-user-menu.scss +3 -3
  103. package/dist/scss/components/_header.scss +8 -9
  104. package/dist/scss/components/_heading.scss +1 -2
  105. package/dist/scss/components/_linkcard.scss +4 -4
  106. package/dist/scss/components/_listbox.scss +7 -7
  107. package/dist/scss/components/_loader.scss +1 -1
  108. package/dist/scss/components/_messagebox.scss +2 -2
  109. package/dist/scss/components/_modal.scss +7 -7
  110. package/dist/scss/components/_preview.scss +6 -6
  111. package/dist/scss/components/_progressbar.scss +3 -3
  112. package/dist/scss/components/_searchinput.scss +2 -2
  113. package/dist/scss/components/_stepper.scss +4 -4
  114. package/dist/scss/components/_tabs.scss +1 -1
  115. package/dist/scss/components/_tag.scss +2 -2
  116. package/dist/scss/components/_timepicker.scss +8 -9
  117. package/dist/scss/elements/_checkbox-radio.scss +4 -4
  118. package/dist/scss/elements/_form.scss +1 -1
  119. package/dist/scss/elements/_list.scss +3 -3
  120. package/dist/scss/elements/_section.scss +2 -2
  121. package/dist/scss/elements/_table.scss +1 -1
  122. package/dist/scss/pkt-grid.scss +6 -0
  123. package/dist/scss/pkt-tokens.scss +5 -0
  124. package/dist/scss/pkt-utilities.scss +6 -0
  125. package/package.json +2 -2
@@ -0,0 +1,106 @@
1
+ /*
2
+ * Colors
3
+ * Brand
4
+ * Light mode
5
+ * Dark mode
6
+ */
7
+
8
+ @use '../abstracts/variables';
9
+
10
+ :root {
11
+ /**
12
+ * @tokens Colors
13
+ * @presenter Color
14
+ */
15
+ // Brand
16
+ @each $name, $color in variables.$pkt-colors {
17
+ --pkt-color-#{$name}: #{$color};
18
+ }
19
+
20
+ // Semantic
21
+ @each $name, $color in variables.$pkt-semantic-colors {
22
+ --pkt-color-#{$name}: #{$color};
23
+ }
24
+
25
+ // Deprecated colors
26
+ @each $name, $color in variables.$colors {
27
+ --#{$name}: #{$color};
28
+ }
29
+
30
+ // Dark mode
31
+ &[data-mode='dark'],
32
+ [data-mode='dark'] {
33
+ // Background
34
+ --pkt-color-background-card: var(--pkt-color-grays-gray-700);
35
+ --pkt-color-background-default: var(--pkt-color-grays-gray-1000);
36
+ --pkt-color-background-subtle: var(--pkt-color-grays-gray-1000);
37
+ --pkt-color-background-transparent: var(--pkt-color-brand-neutrals-transparent);
38
+
39
+ // Borders
40
+ --pkt-color-border-default: var(--pkt-color-brand-neutrals-white);
41
+ --pkt-color-border-beige: var(--pkt-color-brand-dark-beige-1000);
42
+ --pkt-color-border-blue: var(--pkt-color-brand-blue-1000);
43
+ --pkt-color-border-green: var(--pkt-color-brand-green-1000);
44
+ --pkt-color-border-light-beige: var(--pkt-color-brand-light-beige-1000);
45
+ --pkt-color-border-red: var(--pkt-color-brand-red-1000);
46
+ --pkt-color-border-subtle: var(--pkt-color-brand-dark-blue-700);
47
+ --pkt-color-border-yellow: var(--pkt-color-brand-yellow-1000);
48
+ --pkt-color-border-states-active: var(--pkt-color-brand-blue-500);
49
+ --pkt-color-border-states-disabled: var(--pkt-color-grays-gray-500);
50
+ --pkt-color-border-states-focus: var(--pkt-color-brand-purple-1000);
51
+ --pkt-color-border-states-hover: var(--pkt-color-brand-blue-500);
52
+
53
+ // Surface
54
+ --pkt-color-surface-default-faded-green: var(--pkt-color-brand-light-green-400);
55
+ --pkt-color-surface-default-faded-red: var(--pkt-color-brand-red-400);
56
+ --pkt-color-surface-default-gray: var(--pkt-color-brand-neutrals-100);
57
+ --pkt-color-surface-default-light-beige: var(--pkt-color-brand-light-beige-1000);
58
+ --pkt-color-surface-default-light-blue: var(--pkt-color-brand-blue-300);
59
+ --pkt-color-surface-default-light-green: var(--pkt-color-brand-green-400);
60
+ --pkt-color-surface-default-red: var(--pkt-color-brand-red-600);
61
+ --pkt-color-surface-default-yellow: var(--pkt-color-brand-yellow-500);
62
+ --pkt-color-surface-strong-beige: var(--pkt-color-brand-dark-beige-1000);
63
+ --pkt-color-surface-strong-blue: var(--pkt-color-brand-blue-1000);
64
+ --pkt-color-surface-strong-dark-blue: var(--pkt-color-brand-dark-blue-1000);
65
+ --pkt-color-surface-strong-dark-green: var(--pkt-color-brand-dark-green-1000);
66
+ --pkt-color-surface-strong-gray: var(--pkt-color-brand-neutrals-200);
67
+ --pkt-color-surface-strong-green: var(--pkt-color-brand-green-1000);
68
+ --pkt-color-surface-strong-light-green: var(--pkt-color-brand-light-green-1000);
69
+ --pkt-color-surface-strong-red: var(--pkt-color-brand-red-1000);
70
+ --pkt-color-surface-strong-yellow: var(--pkt-color-brand-yellow-1000);
71
+ --pkt-color-surface-subtle-light-blue: var(--pkt-color-brand-blue-200);
72
+ --pkt-color-surface-subtle-light-red: var(--pkt-color-brand-red-100);
73
+ --pkt-color-surface-subtle-pale-blue: var(--pkt-color-brand-blue-100);
74
+ --pkt-color-surface-subtle-white: var(--pkt-color-brand-neutrals-white);
75
+
76
+ // Text
77
+ --pkt-color-text-body-dark: var(--pkt-color-brand-dark-blue-1000);
78
+ --pkt-color-text-body-default: var(--pkt-color-brand-neutrals-white);
79
+ --pkt-color-text-body-light: var(--pkt-color-brand-neutrals-white);
80
+ --pkt-color-text-placeholder: var(--pkt-color-grays-gray-300);
81
+ --pkt-color-text-action-disabled: var(--pkt-color-grays-gray-200);
82
+ --pkt-color-text-action-active: var(--pkt-color-brand-blue-500);
83
+ --pkt-color-text-action-hover: var(--pkt-color-brand-blue-500);
84
+ --pkt-color-text-action-normal: var(--pkt-color-brand-neutrals-white);
85
+
86
+ // Input (shared)
87
+ --pkt-color-input-background-normal: var(--pkt-color-brand-neutrals-white);
88
+ --pkt-color-input-border-active: var(--pkt-color-brand-blue-500);
89
+ --pkt-color-input-border-disabled: var(--pkt-color-grays-gray-200);
90
+ --pkt-color-input-border-error: var(--pkt-color-brand-red-1000);
91
+ --pkt-color-input-border-hover: var(--pkt-color-brand-blue-500);
92
+ --pkt-color-input-border-normal: var(--pkt-color-brand-neutrals-white);
93
+ --pkt-color-input-text-active: var(--pkt-color-brand-warm-blue-1000);
94
+ --pkt-color-input-text-disabled: var(--pkt-color-grays-gray-200);
95
+ --pkt-color-input-text-hover: var(--pkt-color-brand-warm-blue-1000);
96
+ --pkt-color-input-text-normal: var(--pkt-color-brand-dark-blue-1000);
97
+ --pkt-color-input-text-error: var(--pkt-color-brand-red-1000);
98
+ --pkt-color-input-text-open: var(--pkt-color-brand-dark-blue-1000);
99
+
100
+ // Input - Checkbox/Radio specific
101
+ --pkt-color-input-check-background: var(--pkt-color-brand-dark-blue-1000);
102
+ --pkt-color-input-check-border: var(--pkt-color-brand-neutrals-white);
103
+ --pkt-color-input-check-text-active: var(--pkt-color-brand-blue-500);
104
+ --pkt-color-input-check-text-hover: var(--pkt-color-brand-blue-500);
105
+ }
106
+ }
@@ -0,0 +1,43 @@
1
+ // Colors
2
+ // Hjelpeklasser
3
+
4
+ @use '../abstracts/variables';
5
+
6
+ @each $name, $color in variables.$pkt-colors {
7
+ .pkt-color-bg-#{$name} {
8
+ background-color: $color !important;
9
+ }
10
+
11
+ .pkt-color-txt-#{$name} {
12
+ color: $color !important;
13
+ }
14
+
15
+ .pkt-color-border-#{$name} {
16
+ border-color: $color !important;
17
+ }
18
+ }
19
+
20
+ @each $name, $color in variables.$pkt-semantic-colors {
21
+ .pkt-color-bg-#{$name} {
22
+ background-color: var(--pkt-color-#{$name}) !important;
23
+ }
24
+
25
+ .pkt-color-txt-#{$name} {
26
+ color: var(--pkt-color-#{$name}) !important;
27
+ }
28
+
29
+ .pkt-color-border-#{$name} {
30
+ border-color: var(--pkt-color-#{$name}) !important;
31
+ }
32
+ }
33
+
34
+ // Deprecated
35
+ @each $name, $color in variables.$colors {
36
+ .bg-#{$name} {
37
+ background-color: $color !important;
38
+ }
39
+
40
+ .txt-#{$name} {
41
+ color: $color !important;
42
+ }
43
+ }
@@ -1,144 +1,2 @@
1
- /*
2
- * Colors
3
- * Brand
4
- * Light mode
5
- * Dark mode
6
- */
7
-
8
- @use '../abstracts/variables';
9
-
10
- :root {
11
- /**
12
- * @tokens Colors
13
- * @presenter Color
14
- */
15
- // Brand
16
- @each $name, $color in variables.$pkt-colors {
17
- --pkt-color-#{$name}: #{$color};
18
- }
19
-
20
- // Semantic
21
- @each $name, $color in variables.$pkt-semantic-colors {
22
- --pkt-color-#{$name}: #{$color};
23
- }
24
-
25
- // Deprecated colors
26
- @each $name, $color in variables.$colors {
27
- --#{$name}: #{$color};
28
- }
29
-
30
- // Dark mode
31
- &[data-mode='dark'],
32
- [data-mode='dark'] {
33
- // Background
34
- --pkt-color-background-card: var(--pkt-color-grays-gray-700);
35
- --pkt-color-background-default: var(--pkt-color-grays-gray-1000);
36
- --pkt-color-background-subtle: var(--pkt-color-grays-gray-1000);
37
- --pkt-color-background-transparent: var(--pkt-color-brand-neutrals-transparent);
38
-
39
- // Borders
40
- --pkt-color-border-default: var(--pkt-color-brand-neutrals-white);
41
- --pkt-color-border-beige: var(--pkt-color-brand-dark-beige-1000);
42
- --pkt-color-border-blue: var(--pkt-color-brand-blue-1000);
43
- --pkt-color-border-green: var(--pkt-color-brand-green-1000);
44
- --pkt-color-border-light-beige: var(--pkt-color-brand-light-beige-1000);
45
- --pkt-color-border-red: var(--pkt-color-brand-red-1000);
46
- --pkt-color-border-subtle: var(--pkt-color-brand-dark-blue-700);
47
- --pkt-color-border-yellow: var(--pkt-color-brand-yellow-1000);
48
- --pkt-color-border-states-active: var(--pkt-color-brand-blue-500);
49
- --pkt-color-border-states-disabled: var(--pkt-color-grays-gray-500);
50
- --pkt-color-border-states-focus: var(--pkt-color-brand-purple-1000);
51
- --pkt-color-border-states-hover: var(--pkt-color-brand-blue-500);
52
- // Surface
53
- --pkt-color-surface-default-faded-green: var(--pkt-color-brand-light-green-400);
54
- --pkt-color-surface-default-faded-red: var(--pkt-color-brand-red-400);
55
- --pkt-color-surface-default-gray: var(--pkt-color-brand-neutrals-100);
56
- --pkt-color-surface-default-light-beige: var(--pkt-color-brand-light-beige-1000);
57
- --pkt-color-surface-default-light-blue: var(--pkt-color-brand-blue-300);
58
- --pkt-color-surface-default-light-green: var(--pkt-color-brand-green-400);
59
- --pkt-color-surface-default-red: var(--pkt-color-brand-red-600);
60
- --pkt-color-surface-default-yellow: var(--pkt-color-brand-yellow-500);
61
- --pkt-color-surface-strong-beige: var(--pkt-color-brand-dark-beige-1000);
62
- --pkt-color-surface-strong-blue: var(--pkt-color-brand-blue-1000);
63
- --pkt-color-surface-strong-dark-blue: var(--pkt-color-brand-dark-blue-1000);
64
- --pkt-color-surface-strong-dark-green: var(--pkt-color-brand-dark-green-1000);
65
- --pkt-color-surface-strong-gray: var(--pkt-color-brand-neutrals-200);
66
- --pkt-color-surface-strong-green: var(--pkt-color-brand-green-1000);
67
- --pkt-color-surface-strong-light-green: var(--pkt-color-brand-light-green-1000);
68
- --pkt-color-surface-strong-red: var(--pkt-color-brand-red-1000);
69
- --pkt-color-surface-strong-yellow: var(--pkt-color-brand-yellow-1000);
70
- --pkt-color-surface-subtle-light-blue: var(--pkt-color-brand-blue-200);
71
- --pkt-color-surface-subtle-light-red: var(--pkt-color-brand-red-100);
72
- --pkt-color-surface-subtle-pale-blue: var(--pkt-color-brand-blue-100);
73
- --pkt-color-surface-subtle-white: var(--pkt-color-brand-neutrals-white);
74
-
75
- // Text
76
- --pkt-color-text-body-dark: var(--pkt-color-brand-dark-blue-1000);
77
- --pkt-color-text-body-default: var(--pkt-color-brand-neutrals-white);
78
- --pkt-color-text-body-light: var(--pkt-color-brand-neutrals-white);
79
- --pkt-color-text-placeholder: var(--pkt-color-grays-gray-300);
80
- --pkt-color-text-action-disabled: var(--pkt-color-grays-gray-200);
81
- --pkt-color-text-action-active: var(--pkt-color-brand-blue-500);
82
- --pkt-color-text-action-hover: var(--pkt-color-brand-blue-500);
83
- --pkt-color-text-action-normal: var(--pkt-color-brand-neutrals-white);
84
-
85
- // Input (shared)
86
- --pkt-color-input-background-normal: var(--pkt-color-brand-neutrals-white);
87
- --pkt-color-input-border-active: var(--pkt-color-brand-blue-500);
88
- --pkt-color-input-border-disabled: var(--pkt-color-grays-gray-200);
89
- --pkt-color-input-border-error: var(--pkt-color-brand-red-1000);
90
- --pkt-color-input-border-hover: var(--pkt-color-brand-blue-500);
91
- --pkt-color-input-border-normal: var(--pkt-color-brand-neutrals-white);
92
- --pkt-color-input-text-active: var(--pkt-color-brand-warm-blue-1000);
93
- --pkt-color-input-text-disabled: var(--pkt-color-grays-gray-200);
94
- --pkt-color-input-text-hover: var(--pkt-color-brand-warm-blue-1000);
95
- --pkt-color-input-text-normal: var(--pkt-color-brand-dark-blue-1000);
96
- --pkt-color-input-text-error: var(--pkt-color-brand-red-1000);
97
- --pkt-color-input-text-open: var(--pkt-color-brand-dark-blue-1000);
98
-
99
- // Input - Checkbox/Radio specific
100
- --pkt-color-input-check-background: var(--pkt-color-brand-dark-blue-1000);
101
- --pkt-color-input-check-border: var(--pkt-color-brand-neutrals-white);
102
- --pkt-color-input-check-text-active: var(--pkt-color-brand-blue-500);
103
- --pkt-color-input-check-text-hover: var(--pkt-color-brand-blue-500);
104
- }
105
- }
106
-
107
- @each $name, $color in variables.$pkt-colors {
108
- .pkt-color-bg-#{$name} {
109
- background-color: $color !important;
110
- }
111
-
112
- .pkt-color-txt-#{$name} {
113
- color: $color !important;
114
- }
115
-
116
- .pkt-color-border-#{$name} {
117
- border-color: $color !important;
118
- }
119
- }
120
-
121
- @each $name, $color in variables.$pkt-semantic-colors {
122
- .pkt-color-bg-#{$name} {
123
- background-color: var(--pkt-color-#{$name}) !important;
124
- }
125
-
126
- .pkt-color-txt-#{$name} {
127
- color: var(--pkt-color-#{$name}) !important;
128
- }
129
-
130
- .pkt-color-border-#{$name} {
131
- border-color: var(--pkt-color-#{$name}) !important;
132
- }
133
- }
134
-
135
- // Deprecated
136
- @each $name, $color in variables.$colors {
137
- .bg-#{$name} {
138
- background-color: $color !important;
139
- }
140
-
141
- .txt-#{$name} {
142
- color: $color !important;
143
- }
144
- }
1
+ @forward 'colors-tokens';
2
+ @forward 'colors-utilities';
@@ -14,16 +14,13 @@ $-gapsSmall: map.get(variables.$spacing, 'size-16');
14
14
  $-gapsMedium: map.get(variables.$spacing, 'size-32');
15
15
 
16
16
  .pkt-container {
17
- margin-left: auto;
18
- margin-right: auto;
19
- padding-left: $-gapsSmall;
20
- padding-right: $-gapsSmall;
17
+ margin-inline: auto;
18
+ padding-inline: $-gapsSmall;
21
19
  width: 100%;
22
20
  max-width: 100vw;
23
21
 
24
22
  @include bp('tablet-up') {
25
- padding-left: $-gapsMedium;
26
- padding-right: $-gapsMedium;
23
+ padding-inline: $-gapsMedium;
27
24
  }
28
25
 
29
26
  @include bp('laptop-up') {
@@ -66,8 +63,7 @@ $-gapsMedium: map.get(variables.$spacing, 'size-32');
66
63
  margin-right: auto;
67
64
  }
68
65
  &--center {
69
- margin-left: auto;
70
- margin-right: auto;
66
+ margin-inline: auto;
71
67
  }
72
68
  &--right {
73
69
  margin-left: auto;
@@ -1,10 +1,17 @@
1
+ // tokens → reset → typograhy → grid → utilities → a11y.
2
+ // Utilities ligger sist med vilje, så de vinner på spesifisitet når !important fjernes senere
1
3
  @forward 'oslo-sans';
2
- @forward 'colors';
4
+ @forward 'colors-tokens';
5
+
3
6
  @forward 'defaults';
4
- @forward 'spacing';
7
+ @forward 'typography';
8
+
5
9
  @forward 'containers';
6
10
  @forward 'grid';
7
- @forward 'typography';
8
11
  @forward 'layouts';
12
+
13
+ @forward 'colors-utilities';
14
+ @forward 'spacing';
9
15
  @forward 'visibility';
16
+
10
17
  @forward 'accessibility';
@@ -86,14 +86,14 @@ pkt-alert {
86
86
  @include get-text('pkt-txt-18-light');
87
87
 
88
88
  p {
89
- margin-bottom: map.get(variables.$spacing, 'size-16');
89
+ margin-block-end: map.get(variables.$spacing, 'size-16');
90
90
 
91
91
  &:first-of-type {
92
- margin-top: 0;
92
+ margin-block-start: 0;
93
93
  }
94
94
 
95
95
  &:last-of-type {
96
- margin-bottom: 0;
96
+ margin-block-end: 0;
97
97
  }
98
98
  }
99
99
  }
@@ -9,7 +9,7 @@
9
9
  .pkt-badge {
10
10
  display: inline-flex;
11
11
  height: 1.5em;
12
- margin-left: 0.4em;
12
+ margin-inline-start: 0.4em;
13
13
  padding: 0.25em 0.4em;
14
14
  color: black;
15
15
  font-weight: 500;
@@ -55,6 +55,6 @@
55
55
 
56
56
  // Hack to fix pixel alignment on small buttons
57
57
  .pkt-btn--small>.pkt-badge {
58
- padding-top: 0.28em;
58
+ padding-block-start: 0.28em;
59
59
  transform: translateY(-0.1em);
60
60
  }
@@ -81,7 +81,7 @@
81
81
  &__icon {
82
82
  width: 1rem;
83
83
  height: 1rem;
84
- margin-left: map.get(variables.$spacing, 'size-8');
84
+ margin-inline-start: map.get(variables.$spacing, 'size-8');
85
85
  }
86
86
 
87
87
 
@@ -13,7 +13,7 @@ pkt-calendar {
13
13
  display: flex;
14
14
  justify-content: space-between;
15
15
  align-items: center;
16
- margin-bottom: 1rem;
16
+ margin-block-end: 1rem;
17
17
  .pkt-cal-month-picker {
18
18
  display: flex;
19
19
  gap: 0.5rem;
@@ -52,7 +52,7 @@ pkt-calendar {
52
52
 
53
53
  .pkt-cal-days {
54
54
  margin: 0;
55
- padding-left: 0;
55
+ padding-inline-start: 0;
56
56
  border-spacing: 0;
57
57
  td {
58
58
  padding: 0;
@@ -45,7 +45,7 @@ pkt-card {
45
45
  margin: 0;
46
46
  font-size: map.get(variables.$font-size, 'size-30');
47
47
  font-weight: map.get(variables.$font-weight, 'regular');
48
- margin-bottom: map.get(variables.$spacing, 'size-8');
48
+ margin-block-end: map.get(variables.$spacing, 'size-8');
49
49
  hyphens: auto;
50
50
  overflow-wrap: break-word;
51
51
  }
@@ -60,7 +60,7 @@ pkt-card {
60
60
  padding: 0;
61
61
  margin: 0;
62
62
  line-height: unset;
63
- margin-bottom: map.get(variables.$spacing, 'size-16');
63
+ margin-block-end: map.get(variables.$spacing, 'size-16');
64
64
  font-size: map.get(variables.$font-size, 'size-20');
65
65
  font-weight: map.get(variables.$font-weight, 'light');
66
66
  hyphens: auto;
@@ -68,8 +68,8 @@ pkt-card {
68
68
  }
69
69
 
70
70
  .pkt-card__metadata {
71
- margin-top: map.get(variables.$spacing, 'size-16');
72
- margin-bottom: 0;
71
+ margin-block-start: map.get(variables.$spacing, 'size-16');
72
+ margin-block-end: 0;
73
73
  line-height: unset;
74
74
  gap: map.get(variables.$spacing, 'size-8');
75
75
  }
@@ -82,11 +82,11 @@ pkt-card {
82
82
  display: flex;
83
83
  flex-wrap: wrap;
84
84
  gap: 6px;
85
- margin-bottom: map.get(variables.$spacing, 'size-8');
86
- margin-top: 0;
85
+ margin-block-end: map.get(variables.$spacing, 'size-8');
86
+ margin-block-start: 0;
87
87
  &-bottom {
88
- margin-top: map.get(variables.$spacing, 'size-8');
89
- margin-bottom: 0;
88
+ margin-block-start: map.get(variables.$spacing, 'size-8');
89
+ margin-block-end: 0;
90
90
  }
91
91
  }
92
92
 
@@ -134,14 +134,14 @@ pkt-card {
134
134
  &.pkt-card--horizontal {
135
135
  .pkt-card__image {
136
136
  max-width: 400px;
137
- margin-right: 2rem;
137
+ margin-inline-end: 2rem;
138
138
  &-square {
139
139
  align-self: stretch;
140
140
  }
141
141
 
142
142
  @media screen and (max-width: map.get(variables.$breakpoints, 'phablet')) {
143
- margin-right: 0;
144
- margin-bottom: 2rem;
143
+ margin-inline-end: 0;
144
+ margin-block-end: 2rem;
145
145
  max-height: 400px;
146
146
  &-square {
147
147
  max-width: unset;
@@ -153,7 +153,7 @@ pkt-card {
153
153
  // portait image styles
154
154
  &.pkt-card--vertical {
155
155
  .pkt-card__image {
156
- margin-bottom: 2rem;
156
+ margin-block-end: 2rem;
157
157
  max-height: 400px;
158
158
  }
159
159
  }
@@ -48,7 +48,7 @@ pkt-combobox,
48
48
  }
49
49
 
50
50
  &__value {
51
- padding-left: 0.5rem;
51
+ padding-inline-start: 0.5rem;
52
52
  }
53
53
 
54
54
  &__input {
@@ -221,12 +221,12 @@ pkt-combobox,
221
221
  &__placeholder {
222
222
  color: var(--pkt-color-text-placeholder);
223
223
  opacity: 1;
224
- padding-left: 0.5rem;
224
+ padding-inline-start: 0.5rem;
225
225
  }
226
226
  }
227
227
 
228
228
  .pkt-listbox__open {
229
- margin-top: $-box-separator;
229
+ margin-block-start: $-box-separator;
230
230
  }
231
231
  }
232
232
 
@@ -79,8 +79,7 @@ pkt-datepicker-multiple {
79
79
  }
80
80
  }
81
81
  button.pkt-input-icon {
82
- padding-left: 0.75rem;
83
- padding-right: 0.75rem;
82
+ padding-inline: 0.75rem;
84
83
  &:hover {
85
84
  background-color: inherit !important;
86
85
  border-color: inherit !important;
@@ -88,19 +87,19 @@ pkt-datepicker-multiple {
88
87
  }
89
88
  }
90
89
  .pkt-datepicker__input {
91
- padding-right: 0;
90
+ padding-inline-end: 0;
92
91
  background-image: none;
93
92
  width: 8.3rem;
94
93
  }
95
94
  .pkt-input-separator ~ .pkt-datepicker--range {
96
- padding-left: 0.25rem;
95
+ padding-inline-start: 0.25rem;
97
96
  }
98
97
  }
99
98
  .pkt-calendar-popup {
100
99
  top: 100%;
101
100
  left: 0;
102
101
  z-index: 2;
103
- margin-top: 0.5rem;
102
+ margin-block-start: 0.5rem;
104
103
  padding: 0.5rem;
105
104
  position: absolute;
106
105
  width: max-content;
@@ -153,8 +152,7 @@ pkt-datepicker-multiple {
153
152
  }
154
153
 
155
154
  button.pkt-input-icon {
156
- padding-left: 0.5rem;
157
- padding-right: 0.5rem;
155
+ padding-inline: 0.5rem;
158
156
 
159
157
  pkt-icon,
160
158
  .pkt-icon,
@@ -187,7 +185,7 @@ pkt-datepicker-multiple {
187
185
  @supports (-moz-appearance: none) {
188
186
  .pkt-datepicker__inputs {
189
187
  .pkt-datepicker__input {
190
- padding-right: 0.5rem;
188
+ padding-inline-end: 0.5rem;
191
189
  }
192
190
  .pkt-datepicker__input:not(.pkt-datepicker--multiple) {
193
191
  width: auto;
@@ -46,7 +46,7 @@ pkt-fileupload,
46
46
  }
47
47
 
48
48
  .pkt-alert--error.pkt-fileupload__error-alert {
49
- margin-bottom: 1rem;
49
+ margin-block-end: 1rem;
50
50
  width: 100%;
51
51
  }
52
52
  }
@@ -89,7 +89,7 @@ pkt-fileupload,
89
89
  cursor: pointer;
90
90
  padding: 2rem;
91
91
  text-align: center;
92
- margin-bottom: 1rem;
92
+ margin-block-end: 1rem;
93
93
  font-size: 14px;
94
94
 
95
95
  &:hover {
@@ -199,8 +199,8 @@ pkt-fileupload,
199
199
  display: flex;
200
200
  flex-direction: column;
201
201
  padding: 0;
202
- margin-top: 0;
203
- margin-bottom: 1rem;
202
+ margin-block-start: 0;
203
+ margin-block-end: 1rem;
204
204
  row-gap: map.get(variables.$spacing, 'size-8');
205
205
 
206
206
  container-type: inline-size;
@@ -264,7 +264,7 @@ pkt-fileupload,
264
264
  display: flex;
265
265
  flex-direction: column;
266
266
  width: 100%;
267
- padding-left: 0;
267
+ padding-inline-start: 0;
268
268
  align-items: flex-start;
269
269
  gap: 0.5rem;
270
270
  }
@@ -323,7 +323,7 @@ pkt-fileupload,
323
323
  color: var(--pkt-color-text-placeholder);
324
324
  flex: 0 0 auto;
325
325
  white-space: nowrap;
326
- padding-left: 0.5rem;
326
+ padding-inline-start: 0.5rem;
327
327
  }
328
328
 
329
329
  &__cancel-button {
@@ -395,7 +395,7 @@ pkt-fileupload,
395
395
  grid-column: 1 / -1;
396
396
  padding: 0.75rem 1rem;
397
397
  background: var(--pkt-color-surface-default-gray);
398
- margin-top: 0.5rem;
398
+ margin-block-start: 0.5rem;
399
399
 
400
400
  &:empty {
401
401
  display: none;
@@ -458,7 +458,7 @@ pkt-fileupload,
458
458
  &__time {
459
459
  @include typography.get-text('pkt-txt-12-medium');
460
460
  display: block;
461
- margin-top: 0.25rem;
461
+ margin-block-start: 0.25rem;
462
462
  color: var(--pkt-color-text-subtle);
463
463
  }
464
464
 
@@ -551,8 +551,8 @@ pkt-fileupload,
551
551
 
552
552
  &__title {
553
553
  @include typography.get-text('pkt-txt-14');
554
- margin-top: 0.5rem;
555
- margin-bottom: 0.25rem;
554
+ margin-block-start: 0.5rem;
555
+ margin-block-end: 0.25rem;
556
556
  min-width: 0;
557
557
  max-width: 100%;
558
558
  overflow: hidden;
@@ -606,7 +606,7 @@ pkt-fileupload,
606
606
  .pkt-fileupload__queue-display__item__cancel-button {
607
607
  grid-column: 3;
608
608
  grid-row: 1;
609
- margin-left: 1rem;
609
+ margin-inline-start: 1rem;
610
610
 
611
611
  &:hover {
612
612
  color: var(--pkt-color-brand-warm-blue-1000);
@@ -761,11 +761,11 @@ pkt-fileupload,
761
761
  }
762
762
 
763
763
  .pkt-inputwrapper__fieldset {
764
- margin-bottom: 0;
764
+ margin-block-end: 0;
765
765
  }
766
766
 
767
767
  .pkt-inputwrapper__helptext {
768
- margin-bottom: 0.5rem;
768
+ margin-block-end: 0.5rem;
769
769
  }
770
770
  }
771
771
 
@@ -825,7 +825,7 @@ pkt-modal.pkt-fileupload__image-preview-modal .pkt-modal {
825
825
  }
826
826
 
827
827
  .pkt-modal__container {
828
- padding-top: 0;
828
+ padding-block-start: 0;
829
829
  background-color: transparent;
830
830
  }
831
831
 
@@ -907,13 +907,13 @@ pkt-modal.pkt-fileupload__image-preview-modal .pkt-modal {
907
907
  &--prev {
908
908
  grid-column: 1;
909
909
  grid-row: 1;
910
- margin-left: 0.5rem;
910
+ margin-inline-start: 0.5rem;
911
911
  }
912
912
 
913
913
  &--next {
914
914
  grid-column: 3;
915
915
  grid-row: 1;
916
- margin-right: 0.5rem;
916
+ margin-inline-end: 0.5rem;
917
917
  }
918
918
 
919
919
  // Same element as React: nav BEM + `.pkt-btn--medium` — round hit target; skin from `.pkt-btn--secondary`.