@arbeidstilsynet/design-css 0.6.0 → 0.7.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/dist/src/header.css +133 -9
- package/dist/src/index.css +131 -9
- package/package.json +3 -3
package/dist/src/header.css
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
align-items: center;
|
|
7
7
|
width: 100%;
|
|
8
8
|
container-type: inline-size;
|
|
9
|
-
padding: var(--ds-size-2) var(--ds-size-
|
|
9
|
+
padding: var(--ds-size-2) var(--ds-size-6);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.at-header .ds-search {
|
|
@@ -19,6 +19,18 @@
|
|
|
19
19
|
--dsc-link-color--visited: var(--dsc-link-color);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
.at-header .ds-link:has(.at-header__logo) {
|
|
23
|
+
color: var(--ds-color-text-default);
|
|
24
|
+
font-weight: var(--ds-font-weight-medium);
|
|
25
|
+
text-decoration: none;
|
|
26
|
+
line-height: var(--ds-line-height-sm);
|
|
27
|
+
font-size: var(--ds-font-size-5);
|
|
28
|
+
letter-spacing: var(--ds-letter-spacing-8);
|
|
29
|
+
transform: translateY(
|
|
30
|
+
-2.5px
|
|
31
|
+
); /** Literata font med line is noticably lower than other fonts. This counteracts it somewhat, without looking dumb with other fonts */
|
|
32
|
+
}
|
|
33
|
+
|
|
22
34
|
.at-header__container {
|
|
23
35
|
width: 100%;
|
|
24
36
|
max-width: var(--at-header-max-width);
|
|
@@ -38,7 +50,6 @@
|
|
|
38
50
|
.at-header__left {
|
|
39
51
|
justify-content: flex-start;
|
|
40
52
|
gap: var(--ds-size-4);
|
|
41
|
-
margin-right: var(--ds-size-22);
|
|
42
53
|
}
|
|
43
54
|
|
|
44
55
|
.at-header__center {
|
|
@@ -47,6 +58,10 @@
|
|
|
47
58
|
flex: 1;
|
|
48
59
|
}
|
|
49
60
|
|
|
61
|
+
.at-header__center:not(:first-child) {
|
|
62
|
+
margin-left: var(--ds-size-22);
|
|
63
|
+
}
|
|
64
|
+
|
|
50
65
|
.at-header__right {
|
|
51
66
|
justify-content: flex-end;
|
|
52
67
|
margin-left: auto;
|
|
@@ -54,17 +69,28 @@
|
|
|
54
69
|
|
|
55
70
|
.at-header__logo .ds-link:not(:hover):not(:focus-visible),
|
|
56
71
|
.at-header__link:not(:hover):not(:focus-visible),
|
|
57
|
-
.at-header__dropdown-controls .ds-link:not(:hover):not(:focus-visible)
|
|
72
|
+
.at-header__dropdown-controls .ds-link:not(:hover):not(:focus-visible),
|
|
73
|
+
.at-header__dropdown-trigger {
|
|
58
74
|
text-decoration-line: none;
|
|
75
|
+
color: var(--ds-color-neutral-text-default);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.at-header__logo {
|
|
79
|
+
display: flex;
|
|
59
80
|
}
|
|
60
81
|
|
|
61
|
-
|
|
62
|
-
|
|
82
|
+
.at-header__dropdown-trigger {
|
|
83
|
+
font-weight: var(--ds-font-weight-medium);
|
|
84
|
+
}
|
|
63
85
|
|
|
64
|
-
.at-
|
|
65
|
-
|
|
86
|
+
.at-header__link {
|
|
87
|
+
font-weight: var(--ds-font-weight-medium);
|
|
66
88
|
}
|
|
67
89
|
|
|
90
|
+
.at-header__link[aria-current="page"] {
|
|
91
|
+
font-weight: var(--ds-font-weight-semibold);
|
|
92
|
+
}
|
|
93
|
+
|
|
68
94
|
.at-header__dropdown-item-mobile {
|
|
69
95
|
display: none;
|
|
70
96
|
}
|
|
@@ -77,15 +103,95 @@
|
|
|
77
103
|
display: none;
|
|
78
104
|
}
|
|
79
105
|
|
|
106
|
+
.at-header__menu-row {
|
|
107
|
+
align-items: center;
|
|
108
|
+
box-sizing: border-box;
|
|
109
|
+
display: flex;
|
|
110
|
+
gap: var(--ds-size-2);
|
|
111
|
+
height: var(--ds-size-10);
|
|
112
|
+
justify-content: flex-start;
|
|
113
|
+
min-height: unset;
|
|
114
|
+
padding: var(--ds-size-2) var(--ds-size-4);
|
|
115
|
+
text-decoration: none;
|
|
116
|
+
width: 100%;
|
|
117
|
+
color: var(--ds-color-text-default);
|
|
118
|
+
background: unset;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.at-header__menu-row:hover {
|
|
122
|
+
color: var(--ds-color-text-default);
|
|
123
|
+
background: var(--ds-color-surface-tinted);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.at-header__menu-row.padded {
|
|
127
|
+
padding-left: var(--ds-size-11); /** row padding + icon size + gap */
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.at-header__menu-icon {
|
|
131
|
+
align-items: center;
|
|
132
|
+
display: flex;
|
|
133
|
+
flex-shrink: 0;
|
|
134
|
+
height: -moz-fit-content;
|
|
135
|
+
height: fit-content;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.at-header__menu-icon > svg {
|
|
139
|
+
height: var(--ds-size-5);
|
|
140
|
+
width: var(--ds-size-5);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.at-header__menu-badge-info,
|
|
144
|
+
.at-header__menu-badge-warning,
|
|
145
|
+
.at-header__menu-badge-success,
|
|
146
|
+
.at-header__menu-badge-danger {
|
|
147
|
+
display: flex;
|
|
148
|
+
align-items: center;
|
|
149
|
+
justify-content: center;
|
|
150
|
+
width: var(--ds-size-7);
|
|
151
|
+
height: var(--ds-size-7);
|
|
152
|
+
border-radius: 50%;
|
|
153
|
+
font-size: var(--ds-font-size-3);
|
|
154
|
+
font-weight: var(--ds-font-weight-regular);
|
|
155
|
+
margin-left: auto;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.at-header__menu-badge-info {
|
|
159
|
+
color: var(--ds-color-info-text-default);
|
|
160
|
+
background-color: var(--ds-color-info-surface-tinted);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.at-header__menu-badge-warning {
|
|
164
|
+
color: var(--ds-color-warning-text-default);
|
|
165
|
+
background-color: var(--ds-color-warning-surface-tinted);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.at-header__menu-badge-success {
|
|
169
|
+
color: var(--ds-color-success-text-default);
|
|
170
|
+
background-color: var(--ds-color-success-surface-tinted);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.at-header__menu-badge-danger {
|
|
174
|
+
color: var(--ds-color-danger-text-default);
|
|
175
|
+
background-color: var(--ds-color-danger-surface-tinted);
|
|
176
|
+
}
|
|
177
|
+
|
|
80
178
|
/* Responsive adjustments */
|
|
81
179
|
|
|
180
|
+
@media (min-width: 48rem) {
|
|
181
|
+
.at-header__dropdown-trigger {
|
|
182
|
+
background: unset;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.at-header__dropdown-trigger:hover {
|
|
186
|
+
text-decoration: underline;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
82
190
|
@media (max-width: 48rem) {
|
|
83
191
|
.at-header .ds-search {
|
|
84
192
|
max-width: 100%;
|
|
85
193
|
}
|
|
86
|
-
}
|
|
87
194
|
|
|
88
|
-
@container (max-width: 48rem) {
|
|
89
195
|
.at-header__container {
|
|
90
196
|
justify-content: space-between;
|
|
91
197
|
}
|
|
@@ -125,6 +231,24 @@
|
|
|
125
231
|
border-top-right-radius: 0%;
|
|
126
232
|
}
|
|
127
233
|
|
|
234
|
+
.at-header__dropdown-trigger {
|
|
235
|
+
font-weight: var(--ds-font-weight-regular);
|
|
236
|
+
color: var(--ds-color-base-contrast-default);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.at-header__link,
|
|
240
|
+
.at-header__link[data-color="primary"] {
|
|
241
|
+
color: var(--ds-color-text-default);
|
|
242
|
+
font-weight: var(--ds-font-weight-regular);
|
|
243
|
+
width: 100%;
|
|
244
|
+
height: var(--ds-size-10);
|
|
245
|
+
min-height: unset;
|
|
246
|
+
display: block;
|
|
247
|
+
padding: var(--ds-size-2) var(--ds-size-4);
|
|
248
|
+
margin: 0;
|
|
249
|
+
box-sizing: border-box;
|
|
250
|
+
}
|
|
251
|
+
|
|
128
252
|
.at-header__dropdown-close-mobile {
|
|
129
253
|
display: block;
|
|
130
254
|
margin: var(--ds-size-4);
|
package/dist/src/index.css
CHANGED
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
align-items: center;
|
|
209
209
|
width: 100%;
|
|
210
210
|
container-type: inline-size;
|
|
211
|
-
padding: var(--ds-size-2) var(--ds-size-
|
|
211
|
+
padding: var(--ds-size-2) var(--ds-size-6);
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
.at-header .ds-search {
|
|
@@ -220,6 +220,18 @@
|
|
|
220
220
|
--dsc-link-color--visited: var(--dsc-link-color);
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
+
.at-header .ds-link:has(.at-header__logo) {
|
|
224
|
+
color: var(--ds-color-text-default);
|
|
225
|
+
font-weight: var(--ds-font-weight-medium);
|
|
226
|
+
text-decoration: none;
|
|
227
|
+
line-height: var(--ds-line-height-sm);
|
|
228
|
+
font-size: var(--ds-font-size-5);
|
|
229
|
+
letter-spacing: var(--ds-letter-spacing-8);
|
|
230
|
+
transform: translateY(
|
|
231
|
+
-2.5px
|
|
232
|
+
); /** Literata font med line is noticably lower than other fonts. This counteracts it somewhat, without looking dumb with other fonts */
|
|
233
|
+
}
|
|
234
|
+
|
|
223
235
|
.at-header__container {
|
|
224
236
|
width: 100%;
|
|
225
237
|
max-width: var(--at-header-max-width);
|
|
@@ -239,7 +251,6 @@
|
|
|
239
251
|
.at-header__left {
|
|
240
252
|
justify-content: flex-start;
|
|
241
253
|
gap: var(--ds-size-4);
|
|
242
|
-
margin-right: var(--ds-size-22);
|
|
243
254
|
}
|
|
244
255
|
|
|
245
256
|
.at-header__center {
|
|
@@ -248,6 +259,10 @@
|
|
|
248
259
|
flex: 1;
|
|
249
260
|
}
|
|
250
261
|
|
|
262
|
+
.at-header__center:not(:first-child) {
|
|
263
|
+
margin-left: var(--ds-size-22);
|
|
264
|
+
}
|
|
265
|
+
|
|
251
266
|
.at-header__right {
|
|
252
267
|
justify-content: flex-end;
|
|
253
268
|
margin-left: auto;
|
|
@@ -255,16 +270,28 @@
|
|
|
255
270
|
|
|
256
271
|
.at-header__logo .ds-link:not(:hover):not(:focus-visible),
|
|
257
272
|
.at-header__link:not(:hover):not(:focus-visible),
|
|
258
|
-
.at-header__dropdown-controls .ds-link:not(:hover):not(:focus-visible)
|
|
273
|
+
.at-header__dropdown-controls .ds-link:not(:hover):not(:focus-visible),
|
|
274
|
+
.at-header__dropdown-trigger {
|
|
259
275
|
text-decoration-line: none;
|
|
276
|
+
color: var(--ds-color-neutral-text-default);
|
|
260
277
|
}
|
|
261
278
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
.at-header__dropdown-controls:not(:has(> hr:only-child)) {
|
|
265
|
-
padding: var(--ds-size-2) var(--ds-size-4);
|
|
279
|
+
.at-header__logo {
|
|
280
|
+
display: flex;
|
|
266
281
|
}
|
|
267
282
|
|
|
283
|
+
.at-header__dropdown-trigger {
|
|
284
|
+
font-weight: var(--ds-font-weight-medium);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.at-header__link {
|
|
288
|
+
font-weight: var(--ds-font-weight-medium);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.at-header__link[aria-current="page"] {
|
|
292
|
+
font-weight: var(--ds-font-weight-semibold);
|
|
293
|
+
}
|
|
294
|
+
|
|
268
295
|
.at-header__dropdown-item-mobile {
|
|
269
296
|
display: none;
|
|
270
297
|
}
|
|
@@ -277,14 +304,91 @@
|
|
|
277
304
|
display: none;
|
|
278
305
|
}
|
|
279
306
|
|
|
307
|
+
.at-header__menu-row {
|
|
308
|
+
align-items: center;
|
|
309
|
+
box-sizing: border-box;
|
|
310
|
+
display: flex;
|
|
311
|
+
gap: var(--ds-size-2);
|
|
312
|
+
height: var(--ds-size-10);
|
|
313
|
+
justify-content: flex-start;
|
|
314
|
+
min-height: unset;
|
|
315
|
+
padding: var(--ds-size-2) var(--ds-size-4);
|
|
316
|
+
text-decoration: none;
|
|
317
|
+
width: 100%;
|
|
318
|
+
color: var(--ds-color-text-default);
|
|
319
|
+
background: unset;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.at-header__menu-row:hover {
|
|
323
|
+
color: var(--ds-color-text-default);
|
|
324
|
+
background: var(--ds-color-surface-tinted);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.at-header__menu-row.padded {
|
|
328
|
+
padding-left: var(--ds-size-11); /** row padding + icon size + gap */
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.at-header__menu-icon {
|
|
332
|
+
align-items: center;
|
|
333
|
+
display: flex;
|
|
334
|
+
flex-shrink: 0;
|
|
335
|
+
height: -moz-fit-content;
|
|
336
|
+
height: fit-content;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.at-header__menu-icon > svg {
|
|
340
|
+
height: var(--ds-size-5);
|
|
341
|
+
width: var(--ds-size-5);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.at-header__menu-badge-info,
|
|
345
|
+
.at-header__menu-badge-warning,
|
|
346
|
+
.at-header__menu-badge-success,
|
|
347
|
+
.at-header__menu-badge-danger {
|
|
348
|
+
display: flex;
|
|
349
|
+
align-items: center;
|
|
350
|
+
justify-content: center;
|
|
351
|
+
width: var(--ds-size-7);
|
|
352
|
+
height: var(--ds-size-7);
|
|
353
|
+
border-radius: 50%;
|
|
354
|
+
font-size: var(--ds-font-size-3);
|
|
355
|
+
font-weight: var(--ds-font-weight-regular);
|
|
356
|
+
margin-left: auto;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.at-header__menu-badge-info {
|
|
360
|
+
color: var(--ds-color-info-text-default);
|
|
361
|
+
background-color: var(--ds-color-info-surface-tinted);
|
|
362
|
+
}
|
|
363
|
+
.at-header__menu-badge-warning {
|
|
364
|
+
color: var(--ds-color-warning-text-default);
|
|
365
|
+
background-color: var(--ds-color-warning-surface-tinted);
|
|
366
|
+
}
|
|
367
|
+
.at-header__menu-badge-success {
|
|
368
|
+
color: var(--ds-color-success-text-default);
|
|
369
|
+
background-color: var(--ds-color-success-surface-tinted);
|
|
370
|
+
}
|
|
371
|
+
.at-header__menu-badge-danger {
|
|
372
|
+
color: var(--ds-color-danger-text-default);
|
|
373
|
+
background-color: var(--ds-color-danger-surface-tinted);
|
|
374
|
+
}
|
|
375
|
+
|
|
280
376
|
/* Responsive adjustments */
|
|
377
|
+
@media (min-width: 48rem) {
|
|
378
|
+
.at-header__dropdown-trigger {
|
|
379
|
+
background: unset;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.at-header__dropdown-trigger:hover {
|
|
383
|
+
text-decoration: underline;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
281
387
|
@media (max-width: 48rem) {
|
|
282
388
|
.at-header .ds-search {
|
|
283
389
|
max-width: 100%;
|
|
284
390
|
}
|
|
285
|
-
}
|
|
286
391
|
|
|
287
|
-
@container (max-width: 48rem) {
|
|
288
392
|
.at-header__container {
|
|
289
393
|
justify-content: space-between;
|
|
290
394
|
}
|
|
@@ -324,6 +428,24 @@
|
|
|
324
428
|
border-top-right-radius: 0%;
|
|
325
429
|
}
|
|
326
430
|
|
|
431
|
+
.at-header__dropdown-trigger {
|
|
432
|
+
font-weight: var(--ds-font-weight-regular);
|
|
433
|
+
color: var(--ds-color-base-contrast-default);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.at-header__link,
|
|
437
|
+
.at-header__link[data-color="primary"] {
|
|
438
|
+
color: var(--ds-color-text-default);
|
|
439
|
+
font-weight: var(--ds-font-weight-regular);
|
|
440
|
+
width: 100%;
|
|
441
|
+
height: var(--ds-size-10);
|
|
442
|
+
min-height: unset;
|
|
443
|
+
display: block;
|
|
444
|
+
padding: var(--ds-size-2) var(--ds-size-4);
|
|
445
|
+
margin: 0;
|
|
446
|
+
box-sizing: border-box;
|
|
447
|
+
}
|
|
448
|
+
|
|
327
449
|
.at-header__dropdown-close-mobile {
|
|
328
450
|
display: block;
|
|
329
451
|
margin: var(--ds-size-4);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbeidstilsynet/design-css",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "CSS for Designsystemet",
|
|
5
5
|
"author": "Arbeidstilsynet",
|
|
6
6
|
"repository": {
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"@digdir/designsystemet-css": "1.11.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@types/node": "24.10.
|
|
32
|
-
"autoprefixer": "10.4.
|
|
31
|
+
"@types/node": "24.10.10",
|
|
32
|
+
"autoprefixer": "10.4.24",
|
|
33
33
|
"cssnano": "7.1.2",
|
|
34
34
|
"del-cli": "7.0.0",
|
|
35
35
|
"postcss": "8.5.6",
|