@digdir/designsystemet-css 0.5.0 → 0.6.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.
@@ -1,297 +1,3 @@
1
- @layer fds.button {
2
- .fds-button-button-8fa00f0f {
3
- --fc-button-padding: 0 var(--fds-spacing-4);
4
- --fc-button-color: var(--fds-semantic-text-action-first-on_action);
5
-
6
- display: flex;
7
- align-items: center;
8
- border: var(--fds-border_width-default) solid transparent;
9
- color: var(--fc-button-color);
10
- fill: var(--fc-button-color);
11
- min-width: 2.5em;
12
- padding: var(--fc-button-padding);
13
- box-sizing: border-box;
14
- cursor: pointer;
15
- font-family: inherit;
16
- justify-content: center;
17
- text-align: center;
18
- text-decoration: none;
19
- position: relative;
20
- border-radius: var(--fds-border_radius-interactive);
21
- min-height: var(--fds-sizing-10);
22
- }
23
-
24
- .fds-button-button-8fa00f0f svg {
25
- overflow: visible;
26
- }
27
-
28
- .fds-button-small-8fa00f0f::before {
29
- position: absolute;
30
- top: 0;
31
- left: 0;
32
- width: auto;
33
- min-height: auto;
34
- content: '';
35
- }
36
-
37
- .fds-button-small-8fa00f0f::after {
38
- position: absolute;
39
- top: -5px;
40
- left: 0;
41
- width: 100%;
42
- height: 44px;
43
- content: '';
44
- }
45
-
46
- .fds-button-button-8fa00f0f:disabled,
47
- .fds-button-button-8fa00f0f[aria-disabled='true'] {
48
- cursor: not-allowed;
49
- opacity: var(--fds-opacity-disabled);
50
- }
51
-
52
- .fds-button-small-8fa00f0f {
53
- --fc-button-padding: 0 var(--fds-spacing-3);
54
-
55
- gap: var(--fds-sizing-1);
56
- font: var(--fds-typography-paragraph-short-small);
57
- font-family: inherit;
58
- min-height: var(--fds-sizing-10);
59
- }
60
-
61
- .fds-button-medium-8fa00f0f {
62
- --fc-button-padding: 0 var(--fds-spacing-4);
63
-
64
- gap: var(--fds-sizing-2);
65
- font: var(--fds-typography-paragraph-short-medium);
66
- font-family: inherit;
67
- min-height: var(--fds-sizing-12);
68
- }
69
-
70
- .fds-button-large-8fa00f0f {
71
- --fc-button-padding: 0 var(--fds-spacing-5);
72
-
73
- gap: var(--fds-sizing-2);
74
- font: var(--fds-typography-paragraph-short-large);
75
- font-family: inherit;
76
- min-height: var(--fds-sizing-14);
77
- }
78
-
79
- .fds-button-fullWidth-8fa00f0f {
80
- width: 100%;
81
- }
82
-
83
- .fds-button-secondary-8fa00f0f,
84
- .fds-button-tertiary-8fa00f0f {
85
- background-color: transparent;
86
- }
87
-
88
- .fds-button-onlyIcon-8fa00f0f {
89
- --fc-button-padding: 0;
90
- }
91
-
92
- /* Only use hover for non-touch devices to prevent sticky-hovering */
93
- @media (hover: hover) and (pointer: fine) {
94
- .fds-button-primary-8fa00f0f:where(.fds-button-first-8fa00f0f):not([aria-disabled='true'], :disabled):hover {
95
- background-color: var(--fds-semantic-surface-action-first-hover);
96
- }
97
-
98
- .fds-button-primary-8fa00f0f:where(.fds-button-second-8fa00f0f):not([aria-disabled='true'], :disabled):hover {
99
- background-color: var(--fds-semantic-surface-action-second-hover);
100
- }
101
-
102
- .fds-button-primary-8fa00f0f:where(.fds-button-success-8fa00f0f):not([aria-disabled='true'], :disabled):hover {
103
- background-color: var(--fds-semantic-surface-success-hover);
104
- }
105
-
106
- .fds-button-primary-8fa00f0f:where(.fds-button-danger-8fa00f0f):not([aria-disabled='true'], :disabled):hover {
107
- background-color: var(--fds-semantic-surface-danger-hover);
108
- }
109
-
110
- .fds-button-secondary-8fa00f0f:where(.fds-button-first-8fa00f0f):not([aria-disabled='true'], :disabled):hover {
111
- --fc-button-color: var(--fds-semantic-text-action-first-hover);
112
-
113
- border-color: var(--fds-semantic-border-action-first-hover);
114
- background-color: var(--fds-semantic-surface-action-first-no_fill-hover);
115
- }
116
-
117
- .fds-button-secondary-8fa00f0f:where(.fds-button-second-8fa00f0f):not([aria-disabled='true'], :disabled):hover {
118
- --fc-button-color: var(--fds-semantic-text-action-second-hover);
119
-
120
- border-color: var(--fds-semantic-border-action-second-hover);
121
- background-color: var(--fds-semantic-surface-action-second-no_fill-hover);
122
- }
123
-
124
- .fds-button-secondary-8fa00f0f:where(.fds-button-success-8fa00f0f):not([aria-disabled='true'], :disabled):hover {
125
- --fc-button-color: var(--fds-semantic-text-success-hover);
126
-
127
- border-color: var(--fds-semantic-border-success-hover);
128
- background-color: var(--fds-semantic-surface-success-no_fill-hover);
129
- }
130
-
131
- .fds-button-secondary-8fa00f0f:where(.fds-button-danger-8fa00f0f):not([aria-disabled='true'], :disabled):hover {
132
- --fc-button-color: var(--fds-semantic-text-danger-hover);
133
-
134
- border-color: var(--fds-semantic-border-danger-hover);
135
- background-color: var(--fds-semantic-surface-danger-no_fill-hover);
136
- }
137
-
138
- .fds-button-tertiary-8fa00f0f:where(.fds-button-first-8fa00f0f):not([aria-disabled='true'], :disabled):hover {
139
- --fc-button-color: var(--fds-semantic-text-action-first-hover);
140
-
141
- background-color: var(--fds-semantic-surface-action-first-no_fill-hover);
142
- }
143
-
144
- .fds-button-tertiary-8fa00f0f:where(.fds-button-second-8fa00f0f):not([aria-disabled='true'], :disabled):hover {
145
- --fc-button-color: var(--fds-semantic-text-action-second-hover);
146
-
147
- background-color: var(--fds-semantic-surface-action-second-no_fill-hover);
148
- }
149
-
150
- .fds-button-tertiary-8fa00f0f:where(.fds-button-success-8fa00f0f):not([aria-disabled='true'], :disabled):hover {
151
- --fc-button-color: var(--fds-semantic-text-success-hover);
152
-
153
- background-color: var(--fds-semantic-surface-success-no_fill-hover);
154
- }
155
-
156
- .fds-button-tertiary-8fa00f0f:where(.fds-button-danger-8fa00f0f):not([aria-disabled='true'], :disabled):hover {
157
- --fc-button-color: var(--fds-semantic-text-danger-hover);
158
-
159
- background-color: var(--fds-semantic-surface-danger-no_fill-hover);
160
- }
161
- }
162
-
163
- /* Primary button colors */
164
- .fds-button-primary-8fa00f0f:where(.fds-button-first-8fa00f0f) {
165
- background-color: var(--fds-semantic-surface-action-first-default);
166
- }
167
-
168
- .fds-button-primary-8fa00f0f:where(.fds-button-second-8fa00f0f) {
169
- background-color: var(--fds-semantic-surface-action-second-default);
170
- }
171
-
172
- .fds-button-primary-8fa00f0f:where(.fds-button-success-8fa00f0f) {
173
- background-color: var(--fds-semantic-surface-success-default);
174
- }
175
-
176
- .fds-button-primary-8fa00f0f:where(.fds-button-danger-8fa00f0f) {
177
- background-color: var(--fds-semantic-surface-danger-default);
178
- }
179
-
180
- .fds-button-primary-8fa00f0f:where(.fds-button-first-8fa00f0f):not([aria-disabled='true'], :disabled):active {
181
- background-color: var(--fds-semantic-surface-action-first-active);
182
- }
183
-
184
- .fds-button-primary-8fa00f0f:where(.fds-button-second-8fa00f0f):not([aria-disabled='true'], :disabled):active {
185
- background-color: var(--fds-semantic-surface-action-second-active);
186
- }
187
-
188
- .fds-button-primary-8fa00f0f:where(.fds-button-success-8fa00f0f):not([aria-disabled='true'], :disabled):active {
189
- background-color: var(--fds-semantic-surface-success-active);
190
- }
191
-
192
- .fds-button-primary-8fa00f0f:where(.fds-button-danger-8fa00f0f):not([aria-disabled='true'], :disabled):active {
193
- background-color: var(--fds-semantic-surface-danger-active);
194
- }
195
-
196
- /* Secondary button colors */
197
- .fds-button-secondary-8fa00f0f:where(.fds-button-first-8fa00f0f) {
198
- --fc-button-color: var(--fds-semantic-text-action-first-default);
199
-
200
- border-color: var(--fds-semantic-border-action-first-default);
201
- background-color: var(--fds-semantic-surface-action-first-no_fill);
202
- }
203
-
204
- .fds-button-secondary-8fa00f0f:where(.fds-button-second-8fa00f0f) {
205
- --fc-button-color: var(--fds-semantic-text-action-second-default);
206
-
207
- border-color: var(--fds-semantic-border-action-second-default);
208
- background-color: var(--fds-semantic-surface-action-second-no_fill);
209
- }
210
-
211
- .fds-button-secondary-8fa00f0f:where(.fds-button-success-8fa00f0f) {
212
- --fc-button-color: var(--fds-semantic-text-success-default);
213
-
214
- border-color: var(--fds-semantic-border-success-default);
215
- background-color: var(--fds-semantic-surface-success-no_fill);
216
- }
217
-
218
- .fds-button-secondary-8fa00f0f:where(.fds-button-danger-8fa00f0f) {
219
- --fc-button-color: var(--fds-semantic-text-danger-default);
220
-
221
- border-color: var(--fds-semantic-border-danger-default);
222
- background-color: var(--fds-semantic-surface-danger-no_fill);
223
- }
224
-
225
- .fds-button-secondary-8fa00f0f:where(.fds-button-first-8fa00f0f):not([aria-disabled='true'], :disabled):active {
226
- --fc-button-color: var(--fds-semantic-text-action-first-active);
227
-
228
- border-color: var(--fds-semantic-border-action-first-active);
229
- background-color: var(--fds-semantic-surface-action-first-no_fill-active);
230
- }
231
-
232
- .fds-button-secondary-8fa00f0f:where(.fds-button-second-8fa00f0f):not([aria-disabled='true'], :disabled):active {
233
- --fc-button-color: var(--fds-semantic-text-action-second-active);
234
-
235
- border-color: var(--fds-semantic-border-action-second-active);
236
- background-color: var(--fds-semantic-surface-action-second-no_fill-active);
237
- }
238
-
239
- .fds-button-secondary-8fa00f0f:where(.fds-button-success-8fa00f0f):not([aria-disabled='true'], :disabled):active {
240
- --fc-button-color: var(--fds-semantic-text-success-active);
241
-
242
- border-color: var(--fds-semantic-border-success-active);
243
- background-color: var(--fds-semantic-surface-success-no_fill-active);
244
- }
245
-
246
- .fds-button-secondary-8fa00f0f:where(.fds-button-danger-8fa00f0f):not([aria-disabled='true'], :disabled):active {
247
- --fc-button-color: var(--fds-semantic-text-danger-active);
248
-
249
- border-color: var(--fds-semantic-border-danger-active);
250
- background-color: var(--fds-semantic-surface-danger-no_fill-active);
251
- }
252
-
253
- /* Tertiary button colors */
254
- .fds-button-tertiary-8fa00f0f:where(.fds-button-first-8fa00f0f) {
255
- --fc-button-color: var(--fds-semantic-text-action-first-default);
256
- }
257
-
258
- .fds-button-tertiary-8fa00f0f:where(.fds-button-second-8fa00f0f) {
259
- --fc-button-color: var(--fds-semantic-text-action-second-default);
260
- }
261
-
262
- .fds-button-tertiary-8fa00f0f:where(.fds-button-success-8fa00f0f) {
263
- --fc-button-color: var(--fds-semantic-text-success-default);
264
- }
265
-
266
- .fds-button-tertiary-8fa00f0f:where(.fds-button-danger-8fa00f0f) {
267
- --fc-button-color: var(--fds-semantic-text-danger-default);
268
- }
269
-
270
- .fds-button-tertiary-8fa00f0f:where(.fds-button-first-8fa00f0f):not([aria-disabled='true'], :disabled):active {
271
- --fc-button-color: var(--fds-semantic-text-action-first-active);
272
-
273
- background-color: var(--fds-semantic-surface-action-first-no_fill-active);
274
- }
275
-
276
- .fds-button-tertiary-8fa00f0f:where(.fds-button-second-8fa00f0f):not([aria-disabled='true'], :disabled):active {
277
- --fc-button-color: var(--fds-semantic-text-action-second-active);
278
-
279
- background-color: var(--fds-semantic-surface-action-second-no_fill-active);
280
- }
281
-
282
- .fds-button-tertiary-8fa00f0f:where(.fds-button-success-8fa00f0f):not([aria-disabled='true'], :disabled):active {
283
- --fc-button-color: var(--fds-semantic-text-success-active);
284
-
285
- background-color: var(--fds-semantic-surface-success-no_fill-active);
286
- }
287
-
288
- .fds-button-tertiary-8fa00f0f:where(.fds-button-danger-8fa00f0f):not([aria-disabled='true'], :disabled):active {
289
- --fc-button-color: var(--fds-semantic-text-danger-active);
290
-
291
- background-color: var(--fds-semantic-surface-danger-no_fill-active);
292
- }
293
- }
294
-
295
1
  @layer fds.paragraph {
296
2
  .fds-paragraph-paragraph-b69df5f3 {
297
3
  --fdsc-bottom-spacing: var(--fds-spacing-5);
@@ -1360,27 +1066,6 @@
1360
1066
  }
1361
1067
  }
1362
1068
 
1363
- @layer fds.skiplink {
1364
- .fds-skiplink-skiplink-d4abeaef:focus {
1365
- display: block;
1366
- outline: 0;
1367
- position: static;
1368
- width: auto;
1369
- height: auto;
1370
- margin: inherit;
1371
- overflow: visible;
1372
- clip: auto;
1373
- clip-path: none;
1374
- white-space: inherit;
1375
- text-decoration: underline;
1376
- text-decoration-thickness: 3px;
1377
- text-underline-offset: 0.3em;
1378
- padding: var(--fds-spacing-3) var(--fds-spacing-4) var(--fds-spacing-3) var(--fds-spacing-6);
1379
- color: var(--fds-semantic-text-neutral-default);
1380
- background: var(--fds-semantic-border-focus-outline);
1381
- }
1382
- }
1383
-
1384
1069
  @layer fds.tooltip {
1385
1070
  .fds-tooltip-wrapper-a3778147 {
1386
1071
  background: var(--fds-semantic-surface-neutral-inverted);
package/skiplink.css ADDED
@@ -0,0 +1,20 @@
1
+ @layer fds.skiplink {
2
+ .fds-skiplink:focus {
3
+ display: block;
4
+ outline: 0;
5
+ position: static;
6
+ width: auto;
7
+ height: auto;
8
+ margin: inherit;
9
+ overflow: visible;
10
+ clip: auto;
11
+ clip-path: none;
12
+ white-space: inherit;
13
+ text-decoration: underline;
14
+ text-decoration-thickness: 3px;
15
+ text-underline-offset: 0.3em;
16
+ padding: var(--fds-spacing-3) var(--fds-spacing-4) var(--fds-spacing-3) var(--fds-spacing-6);
17
+ color: var(--fds-semantic-text-neutral-default);
18
+ background: var(--fds-semantic-border-focus-outline);
19
+ }
20
+ }
package/utils.css CHANGED
@@ -19,10 +19,8 @@
19
19
  .fds-focus:focus-visible {
20
20
  --fds-focus-border-width: 3px;
21
21
 
22
- outline: var(--fds-focus-border-width) solid
23
- var(--fds-semantic-border-focus-outline);
22
+ outline: var(--fds-focus-border-width) solid var(--fds-semantic-border-focus-outline);
24
23
  outline-offset: var(--fds-focus-border-width);
25
- box-shadow: 0 0 0 var(--fds-focus-border-width)
26
- var(--fds-semantic-border-focus-boxshadow);
24
+ box-shadow: 0 0 0 var(--fds-focus-border-width) var(--fds-semantic-border-focus-boxshadow);
27
25
  }
28
26
  }