@sb1/ffe-cards 20.2.3 → 20.4.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/README.md CHANGED
@@ -24,6 +24,14 @@ Or pick just the ones you need from these:
24
24
  @import 'path/to/node_modules/@sb1/ffe-cards/less/image-card';
25
25
  ```
26
26
 
27
+ ### Importing compiled CSS
28
+
29
+ If your project does not use Less, you can import the compiled styling:
30
+
31
+ ```css
32
+ @import '~@sb1/ffe-cards/css/cards.css';
33
+ ```
34
+
27
35
  See also `@sb1/ffe-cards-react`.
28
36
 
29
37
  ## Theming with CSS custom properties
package/css/cards.css ADDED
@@ -0,0 +1,910 @@
1
+ :root,
2
+ :host {
3
+ --ffe-v-cards-common-text-color: var(--ffe-g-text-color);
4
+ --ffe-v-cards-common-card-background-color: var(--ffe-farge-hvit);
5
+ --ffe-v-cards-common-card-border-color: transparent;
6
+ --ffe-v-cards-common-card-box-shadow-color: var(--ffe-farge-graa);
7
+ --ffe-v-cards-common-card-box-shadow: 0 1px 4px 0 var(--ffe-v-cards-common-card-box-shadow-color);
8
+ --ffe-v-cards-common-card-border-radius: 16px;
9
+ --ffe-v-cards-clickabe-card-link-visited-color: inherit;
10
+ --ffe-v-cards-subtext-color: var(--ffe-farge-moerkgraa);
11
+ --ffe-v-cards-border-hover-color: var(--ffe-farge-vann);
12
+ --ffe-v-cards-stippled-border-color: var(--ffe-farge-vann);
13
+ --ffe-v-cards-icon-color: var(--ffe-farge-fjell);
14
+ --ffe-v-cards-image-card-border: none;
15
+ --ffe-v-cards-common-group-card-border: none;
16
+ --ffe-v-cards-common-group-card-separation-border-color: var(--ffe-farge-lysgraa);
17
+ --ffe-v-group-card-footer-background-color: var(--ffe-farge-syrin-30);
18
+ }
19
+ @media (prefers-color-scheme: dark) {
20
+ :root .regard-color-scheme-preference,
21
+ :host .regard-color-scheme-preference {
22
+ --ffe-v-cards-common-text-color: var(--ffe-farge-hvit);
23
+ --ffe-v-cards-common-card-background-color: var(--ffe-farge-svart);
24
+ --ffe-v-cards-common-card-border-color: var(--ffe-farge-koksgraa);
25
+ --ffe-v-cards-common-card-box-shadow: none;
26
+ --ffe-v-cards-clickabe-card-link-visited-color: var(--ffe-farge-hvit);
27
+ --ffe-v-cards-subtext-color: var(--ffe-farge-graa);
28
+ --ffe-v-cards-border-hover-color: var(--ffe-g-primary-color);
29
+ --ffe-v-cards-stippled-border-color: var(--ffe-farge-vann-70);
30
+ --ffe-v-cards-icon-color: var(--ffe-farge-vann-70);
31
+ --ffe-v-cards-image-card-border: 1px solid var(--ffe-farge-koksgraa);
32
+ --ffe-v-cards-common-group-card-border: 1px solid var(--ffe-farge-moerkgraa);
33
+ --ffe-v-cards-common-group-card-separation-border-color: var(--ffe-farge-moerkgraa);
34
+ --ffe-v-group-card-footer-background-color: var(--ffe-farge-koksgraa);
35
+ }
36
+ }
37
+ .ffe-card-base {
38
+ background: var(--ffe-v-cards-common-card-background-color);
39
+ -webkit-box-shadow: var(--ffe-v-cards-common-card-box-shadow);
40
+ box-shadow: var(--ffe-v-cards-common-card-box-shadow);
41
+ margin: 0 0 var(--ffe-spacing-xs);
42
+ border: 2px solid var(--ffe-v-cards-common-card-border-color);
43
+ border-radius: var(--ffe-v-cards-common-card-border-radius);
44
+ -webkit-transition: all var(--ffe-transition-duration) var(--ffe-ease);
45
+ -o-transition: all var(--ffe-transition-duration) var(--ffe-ease);
46
+ transition: all var(--ffe-transition-duration) var(--ffe-ease);
47
+ outline: none;
48
+ width: 100%;
49
+ text-decoration: none;
50
+ padding: var(--ffe-spacing-sm);
51
+ -webkit-box-shadow: none;
52
+ box-shadow: none;
53
+ }
54
+ @media (min-width: 768px) {
55
+ .ffe-card-base {
56
+ margin-bottom: var(--ffe-spacing-md);
57
+ }
58
+ }
59
+ @media (hover: hover) and (pointer: fine) {
60
+ .ffe-card-base--clickable:hover {
61
+ cursor: pointer;
62
+ border-color: var(--ffe-g-primary-color);
63
+ }
64
+ .ffe-card-base--clickable:hover :where(
65
+ .ffe-card-body__card-name,
66
+ .ffe-card-body__title,
67
+ .ffe-card-body__subtext,
68
+ .ffe-card-body__text
69
+ ):has(.ffe-card__action) {
70
+ text-decoration: underline;
71
+ }
72
+ }
73
+ .ffe-card-base--clickable:focus-within {
74
+ border-color: var(--ffe-g-primary-color);
75
+ -webkit-box-shadow: 0 0 0 2px var(--ffe-g-primary-color);
76
+ box-shadow: 0 0 0 2px var(--ffe-g-primary-color);
77
+ }
78
+ .ffe-card-base--clickable:focus-within :where(
79
+ .ffe-card-body__card-name,
80
+ .ffe-card-body__title,
81
+ .ffe-card-body__subtext,
82
+ .ffe-card-body__text
83
+ ):has(.ffe-card__action) {
84
+ text-decoration: underline;
85
+ }
86
+ .ffe-card-base--clickable button.ffe-card__action--raw {
87
+ background: none;
88
+ color: inherit;
89
+ border: none;
90
+ padding: 0;
91
+ font: inherit;
92
+ cursor: pointer;
93
+ outline: inherit;
94
+ }
95
+ .ffe-card-base--clickable a.ffe-card__action--raw {
96
+ color: inherit;
97
+ text-decoration: inherit;
98
+ outline: inherit;
99
+ }
100
+ .ffe-card-base--clickable .ffe-card__action--raw:visited {
101
+ color: var(--ffe-v-cards-clickabe-card-link-visited-color);
102
+ }
103
+ .ffe-card-base--no-padding {
104
+ padding: 0;
105
+ }
106
+ .ffe-card-base--bg-sand-30 {
107
+ --ffe-v-cards-common-card-background-color: var(--ffe-farge-sand-30);
108
+ }
109
+ .ffe-card-base--bg-sand-70 {
110
+ --ffe-v-cards-common-card-background-color: var(--ffe-farge-sand-70);
111
+ }
112
+ .ffe-card-base--bg-frost-30 {
113
+ --ffe-v-cards-common-card-background-color: var(--ffe-farge-frost-30);
114
+ }
115
+ .ffe-card-base--bg-syrin-30 {
116
+ --ffe-v-cards-common-card-background-color: var(--ffe-farge-syrin-30);
117
+ }
118
+ .ffe-card-base--bg-syrin-70 {
119
+ --ffe-v-cards-common-card-background-color: var(--ffe-farge-syrin-70);
120
+ }
121
+ .ffe-card-base--shadow {
122
+ -webkit-box-shadow: var(--ffe-v-cards-common-card-box-shadow);
123
+ box-shadow: var(--ffe-v-cards-common-card-box-shadow);
124
+ }
125
+ .ffe-card-base--no-margin {
126
+ margin: 0;
127
+ }
128
+ .ffe-card-base--text-center {
129
+ text-align: center;
130
+ }
131
+ @media (prefers-color-scheme: dark) {
132
+ .regard-color-scheme-preference .ffe-card-base--dm-bg-svart {
133
+ --ffe-v-cards-common-card-background-color: var(--ffe-farge-svart);
134
+ }
135
+ .regard-color-scheme-preference .ffe-card-base--dm-bg-natt {
136
+ --ffe-v-cards-common-card-background-color: var(--ffe-farge-natt);
137
+ }
138
+ .regard-color-scheme-preference .ffe-card-base--dm-bg-koksgraa {
139
+ --ffe-v-cards-common-card-background-color: var(--ffe-farge-koksgraa);
140
+ }
141
+ }
142
+ .ffe-card-body__title {
143
+ line-height: 1.25rem;font-size: var(--ffe-fontsize-h5);
144
+ }
145
+ .ffe-card-body__subtext {
146
+ color: var(--ffe-g-text-color);font-family: var(--ffe-g-font);font-weight: normal;font-variant-numeric: tabular-nums;line-height: 1.25rem;margin: 0;
147
+ }
148
+ .ffe-card-body__subtext {
149
+ font-size: var(--ffe-fontsize-small-text);
150
+ }
151
+ .ffe-card-body__title {
152
+ color: var(--ffe-g-heading-color);font-weight: normal;margin-bottom: var(--ffe-spacing-xs);margin-top: 0;text-wrap: balance;overflow-wrap: anywhere;
153
+ }
154
+ .ffe-card-body__title {
155
+ font-family: var(--ffe-g-font-heading-small);font-variant-numeric: tabular-nums;
156
+ }
157
+ @media (min-width: 480px) {
158
+ .ffe-card-body__title {
159
+ line-height: 1.5rem;
160
+ }
161
+ .ffe-card-body__title {
162
+ margin-bottom: var(--ffe-spacing-sm);
163
+ }
164
+ .ffe-card-body__subtext {
165
+ line-height: 1.25rem;
166
+ }
167
+ }
168
+ @media (min-width: 1024px) {
169
+ .ffe-card-body__title {
170
+ margin-bottom: var(--ffe-spacing-md);
171
+ }
172
+ }
173
+ .ffe-card-body__subtext {
174
+ overflow-wrap: anywhere;
175
+ }
176
+ .ffe-card-body__card-name {
177
+ margin: 0 0 var(--ffe-spacing-2xs) 0;
178
+ }
179
+ .ffe-card-body__text {
180
+ margin: var(--ffe-spacing-2xs) 0 0 0;
181
+ }
182
+ .ffe-card-body__subtext {
183
+ color: var(--ffe-v-cards-subtext-color);
184
+ margin: var(--ffe-spacing-2xs) 0 0 0;
185
+ }
186
+ .ffe-card-body__title {
187
+ margin: 0;
188
+ }
189
+ .ffe-card-body__title--overflow-ellipsis {
190
+ -o-text-overflow: ellipsis;
191
+ text-overflow: ellipsis;
192
+ white-space: nowrap;
193
+ overflow: hidden;
194
+ }
195
+ :where(
196
+ .ffe-card-body__card-name,
197
+ .ffe-card-body__text,
198
+ .ffe-card-body__subtext,
199
+ .ffe-card-body__title
200
+ ) {
201
+ overflow-wrap: anywhere;
202
+ }
203
+ .ffe-text-card {
204
+ background: var(--ffe-v-cards-common-card-background-color);
205
+ -webkit-box-shadow: var(--ffe-v-cards-common-card-box-shadow);
206
+ box-shadow: var(--ffe-v-cards-common-card-box-shadow);
207
+ margin: 0 0 var(--ffe-spacing-xs);
208
+ border: 2px solid var(--ffe-v-cards-common-card-border-color);
209
+ border-radius: var(--ffe-v-cards-common-card-border-radius);
210
+ -webkit-transition: all var(--ffe-transition-duration) var(--ffe-ease);
211
+ -o-transition: all var(--ffe-transition-duration) var(--ffe-ease);
212
+ transition: all var(--ffe-transition-duration) var(--ffe-ease);
213
+ outline: none;
214
+ width: 100%;
215
+ text-decoration: none;
216
+ display: -webkit-box;
217
+ display: -ms-flexbox;
218
+ display: flex;
219
+ padding: var(--ffe-spacing-sm) var(--ffe-spacing-lg);
220
+ -webkit-box-orient: vertical;
221
+ -webkit-box-direction: normal;
222
+ -ms-flex-flow: column nowrap;
223
+ flex-flow: column nowrap;
224
+ text-align: center;
225
+ overflow: hidden;
226
+ min-height: auto;
227
+ }
228
+ @media (min-width: 768px) {
229
+ .ffe-text-card {
230
+ margin-bottom: var(--ffe-spacing-md);
231
+ }
232
+ }
233
+ @media (hover: hover) and (pointer: fine) {
234
+ .ffe-text-card--clickable:hover {
235
+ cursor: pointer;
236
+ border-color: var(--ffe-g-primary-color);
237
+ }
238
+ .ffe-text-card--clickable:hover :where(
239
+ .ffe-card-body__card-name,
240
+ .ffe-card-body__title,
241
+ .ffe-card-body__subtext,
242
+ .ffe-card-body__text
243
+ ):has(.ffe-card__action) {
244
+ text-decoration: underline;
245
+ }
246
+ }
247
+ .ffe-text-card--clickable:focus-within {
248
+ border-color: var(--ffe-g-primary-color);
249
+ -webkit-box-shadow: 0 0 0 2px var(--ffe-g-primary-color);
250
+ box-shadow: 0 0 0 2px var(--ffe-g-primary-color);
251
+ }
252
+ .ffe-text-card--clickable:focus-within :where(
253
+ .ffe-card-body__card-name,
254
+ .ffe-card-body__title,
255
+ .ffe-card-body__subtext,
256
+ .ffe-card-body__text
257
+ ):has(.ffe-card__action) {
258
+ text-decoration: underline;
259
+ }
260
+ .ffe-text-card--clickable button.ffe-card__action--raw {
261
+ background: none;
262
+ color: inherit;
263
+ border: none;
264
+ padding: 0;
265
+ font: inherit;
266
+ cursor: pointer;
267
+ outline: inherit;
268
+ }
269
+ .ffe-text-card--clickable a.ffe-card__action--raw {
270
+ color: inherit;
271
+ text-decoration: inherit;
272
+ outline: inherit;
273
+ }
274
+ .ffe-text-card--clickable .ffe-card__action--raw:visited {
275
+ color: var(--ffe-v-cards-clickabe-card-link-visited-color);
276
+ }
277
+ .ffe-text-card--no-margin {
278
+ margin: 0;
279
+ }
280
+ @media (min-width: 768px) {
281
+ .ffe-text-card {
282
+ min-height: 100px;
283
+ }
284
+ }
285
+ .ffe-text-card--left-align {
286
+ text-align: left;
287
+ }
288
+ .ffe-icon-card {
289
+ background: var(--ffe-v-cards-common-card-background-color);
290
+ -webkit-box-shadow: var(--ffe-v-cards-common-card-box-shadow);
291
+ box-shadow: var(--ffe-v-cards-common-card-box-shadow);
292
+ margin: 0 0 var(--ffe-spacing-xs);
293
+ border: 2px solid var(--ffe-v-cards-common-card-border-color);
294
+ border-radius: var(--ffe-v-cards-common-card-border-radius);
295
+ -webkit-transition: all var(--ffe-transition-duration) var(--ffe-ease);
296
+ -o-transition: all var(--ffe-transition-duration) var(--ffe-ease);
297
+ transition: all var(--ffe-transition-duration) var(--ffe-ease);
298
+ outline: none;
299
+ width: 100%;
300
+ text-decoration: none;
301
+ display: grid;
302
+ grid-template-columns: auto 1fr;
303
+ -webkit-box-align: center;
304
+ -ms-flex-align: center;
305
+ align-items: center;
306
+ padding: var(--ffe-spacing-md);
307
+ gap: var(--ffe-spacing-sm);
308
+ }
309
+ @media (min-width: 768px) {
310
+ .ffe-icon-card {
311
+ margin-bottom: var(--ffe-spacing-md);
312
+ }
313
+ }
314
+ @media (hover: hover) and (pointer: fine) {
315
+ .ffe-icon-card--clickable:hover {
316
+ cursor: pointer;
317
+ border-color: var(--ffe-g-primary-color);
318
+ }
319
+ .ffe-icon-card--clickable:hover :where(
320
+ .ffe-card-body__card-name,
321
+ .ffe-card-body__title,
322
+ .ffe-card-body__subtext,
323
+ .ffe-card-body__text
324
+ ):has(.ffe-card__action) {
325
+ text-decoration: underline;
326
+ }
327
+ }
328
+ .ffe-icon-card--clickable:focus-within {
329
+ border-color: var(--ffe-g-primary-color);
330
+ -webkit-box-shadow: 0 0 0 2px var(--ffe-g-primary-color);
331
+ box-shadow: 0 0 0 2px var(--ffe-g-primary-color);
332
+ }
333
+ .ffe-icon-card--clickable:focus-within :where(
334
+ .ffe-card-body__card-name,
335
+ .ffe-card-body__title,
336
+ .ffe-card-body__subtext,
337
+ .ffe-card-body__text
338
+ ):has(.ffe-card__action) {
339
+ text-decoration: underline;
340
+ }
341
+ .ffe-icon-card--clickable button.ffe-card__action--raw {
342
+ background: none;
343
+ color: inherit;
344
+ border: none;
345
+ padding: 0;
346
+ font: inherit;
347
+ cursor: pointer;
348
+ outline: inherit;
349
+ }
350
+ .ffe-icon-card--clickable a.ffe-card__action--raw {
351
+ color: inherit;
352
+ text-decoration: inherit;
353
+ outline: inherit;
354
+ }
355
+ .ffe-icon-card--clickable .ffe-card__action--raw:visited {
356
+ color: var(--ffe-v-cards-clickabe-card-link-visited-color);
357
+ }
358
+ .ffe-icon-card--no-margin {
359
+ margin: 0;
360
+ }
361
+ .ffe-icon-card--right {
362
+ grid-template-columns: 1fr auto;
363
+ -webkit-box-pack: justify;
364
+ -ms-flex-pack: justify;
365
+ justify-content: space-between;
366
+ }
367
+ @media (min-width: 768px) {
368
+ .ffe-icon-card {
369
+ gap: var(--ffe-spacing-md);
370
+ }
371
+ .ffe-icon-card--condensed {
372
+ gap: var(--ffe-spacing-sm);
373
+ }
374
+ }
375
+ .ffe-icon-card .ffe-icon-card__icon {
376
+ color: var(--ffe-v-cards-icon-color);
377
+ }
378
+ .ffe-icon-card--condensed {
379
+ padding: var(--ffe-spacing-sm);
380
+ }
381
+ .ffe-illustration-card {
382
+ background: var(--ffe-v-cards-common-card-background-color);
383
+ -webkit-box-shadow: var(--ffe-v-cards-common-card-box-shadow);
384
+ box-shadow: var(--ffe-v-cards-common-card-box-shadow);
385
+ margin: 0 0 var(--ffe-spacing-xs);
386
+ border: 2px solid var(--ffe-v-cards-common-card-border-color);
387
+ border-radius: var(--ffe-v-cards-common-card-border-radius);
388
+ -webkit-transition: all var(--ffe-transition-duration) var(--ffe-ease);
389
+ -o-transition: all var(--ffe-transition-duration) var(--ffe-ease);
390
+ transition: all var(--ffe-transition-duration) var(--ffe-ease);
391
+ outline: none;
392
+ width: 100%;
393
+ text-decoration: none;
394
+ display: grid;
395
+ grid-template-columns: auto 1fr;
396
+ -webkit-column-gap: var(--ffe-spacing-md);
397
+ -moz-column-gap: var(--ffe-spacing-md);
398
+ column-gap: var(--ffe-spacing-md);
399
+ padding: var(--ffe-spacing-md);
400
+ -webkit-box-align: center;
401
+ -ms-flex-align: center;
402
+ align-items: center;
403
+ }
404
+ @media (min-width: 768px) {
405
+ .ffe-illustration-card {
406
+ margin-bottom: var(--ffe-spacing-md);
407
+ }
408
+ }
409
+ @media (hover: hover) and (pointer: fine) {
410
+ .ffe-illustration-card--clickable:hover {
411
+ cursor: pointer;
412
+ border-color: var(--ffe-g-primary-color);
413
+ }
414
+ .ffe-illustration-card--clickable:hover :where(
415
+ .ffe-card-body__card-name,
416
+ .ffe-card-body__title,
417
+ .ffe-card-body__subtext,
418
+ .ffe-card-body__text
419
+ ):has(.ffe-card__action) {
420
+ text-decoration: underline;
421
+ }
422
+ }
423
+ .ffe-illustration-card--clickable:focus-within {
424
+ border-color: var(--ffe-g-primary-color);
425
+ -webkit-box-shadow: 0 0 0 2px var(--ffe-g-primary-color);
426
+ box-shadow: 0 0 0 2px var(--ffe-g-primary-color);
427
+ }
428
+ .ffe-illustration-card--clickable:focus-within :where(
429
+ .ffe-card-body__card-name,
430
+ .ffe-card-body__title,
431
+ .ffe-card-body__subtext,
432
+ .ffe-card-body__text
433
+ ):has(.ffe-card__action) {
434
+ text-decoration: underline;
435
+ }
436
+ .ffe-illustration-card--clickable button.ffe-card__action--raw {
437
+ background: none;
438
+ color: inherit;
439
+ border: none;
440
+ padding: 0;
441
+ font: inherit;
442
+ cursor: pointer;
443
+ outline: inherit;
444
+ }
445
+ .ffe-illustration-card--clickable a.ffe-card__action--raw {
446
+ color: inherit;
447
+ text-decoration: inherit;
448
+ outline: inherit;
449
+ }
450
+ .ffe-illustration-card--clickable .ffe-card__action--raw:visited {
451
+ color: var(--ffe-v-cards-clickabe-card-link-visited-color);
452
+ }
453
+ .ffe-illustration-card--no-margin {
454
+ margin: 0;
455
+ }
456
+ .ffe-illustration-card--condensed {
457
+ -webkit-column-gap: var(--ffe-spacing-sm);
458
+ -moz-column-gap: var(--ffe-spacing-sm);
459
+ column-gap: var(--ffe-spacing-sm);
460
+ padding: var(--ffe-spacing-sm);
461
+ }
462
+ .ffe-illustration-card--right {
463
+ grid-template-columns: 1fr auto;
464
+ -webkit-box-pack: justify;
465
+ -ms-flex-pack: justify;
466
+ justify-content: space-between;
467
+ }
468
+ .ffe-image-card {
469
+ background: var(--ffe-v-cards-common-card-background-color);
470
+ -webkit-box-shadow: var(--ffe-v-cards-common-card-box-shadow);
471
+ box-shadow: var(--ffe-v-cards-common-card-box-shadow);
472
+ margin: 0 0 var(--ffe-spacing-xs);
473
+ border: 2px solid var(--ffe-v-cards-common-card-border-color);
474
+ border-radius: var(--ffe-v-cards-common-card-border-radius);
475
+ -webkit-transition: all var(--ffe-transition-duration) var(--ffe-ease);
476
+ -o-transition: all var(--ffe-transition-duration) var(--ffe-ease);
477
+ transition: all var(--ffe-transition-duration) var(--ffe-ease);
478
+ outline: none;
479
+ width: 100%;
480
+ text-decoration: none;
481
+ --border-color: transparent;
482
+ display: -webkit-box;
483
+ display: -ms-flexbox;
484
+ display: flex;
485
+ padding: 0;
486
+ max-width: 290px;
487
+ border: var(--ffe-v-cards-image-card-border);
488
+ -webkit-box-orient: vertical;
489
+ -webkit-box-direction: normal;
490
+ -ms-flex-flow: column nowrap;
491
+ flex-flow: column nowrap;
492
+ }
493
+ @media (min-width: 768px) {
494
+ .ffe-image-card {
495
+ margin-bottom: var(--ffe-spacing-md);
496
+ }
497
+ }
498
+ @media (hover: hover) and (pointer: fine) {
499
+ .ffe-image-card--clickable:hover {
500
+ cursor: pointer;
501
+ border-color: var(--ffe-g-primary-color);
502
+ }
503
+ .ffe-image-card--clickable:hover :where(
504
+ .ffe-card-body__card-name,
505
+ .ffe-card-body__title,
506
+ .ffe-card-body__subtext,
507
+ .ffe-card-body__text
508
+ ):has(.ffe-card__action) {
509
+ text-decoration: underline;
510
+ }
511
+ }
512
+ .ffe-image-card--clickable:focus-within {
513
+ border-color: var(--ffe-g-primary-color);
514
+ -webkit-box-shadow: 0 0 0 2px var(--ffe-g-primary-color);
515
+ box-shadow: 0 0 0 2px var(--ffe-g-primary-color);
516
+ }
517
+ .ffe-image-card--clickable:focus-within :where(
518
+ .ffe-card-body__card-name,
519
+ .ffe-card-body__title,
520
+ .ffe-card-body__subtext,
521
+ .ffe-card-body__text
522
+ ):has(.ffe-card__action) {
523
+ text-decoration: underline;
524
+ }
525
+ .ffe-image-card--clickable button.ffe-card__action--raw {
526
+ background: none;
527
+ color: inherit;
528
+ border: none;
529
+ padding: 0;
530
+ font: inherit;
531
+ cursor: pointer;
532
+ outline: inherit;
533
+ }
534
+ .ffe-image-card--clickable a.ffe-card__action--raw {
535
+ color: inherit;
536
+ text-decoration: inherit;
537
+ outline: inherit;
538
+ }
539
+ .ffe-image-card--clickable .ffe-card__action--raw:visited {
540
+ color: var(--ffe-v-cards-clickabe-card-link-visited-color);
541
+ }
542
+ .ffe-image-card--no-margin {
543
+ margin: 0;
544
+ }
545
+ .ffe-image-card .ffe-image-card__image-overlay,
546
+ .ffe-image-card .ffe-image-card__body {
547
+ border-color: var(--border-color);
548
+ }
549
+ .ffe-image-card:has(.ffe-card__action:active, .ffe-card__action:focus) {
550
+ --border-color: var(--ffe-v-cards-border-hover-color);
551
+ }
552
+ @media (hover: hover) and (pointer: fine) {
553
+ .ffe-image-card:has(.ffe-card__action):hover {
554
+ --border-color: var(--ffe-v-cards-border-hover-color);
555
+ }
556
+ }
557
+ .ffe-image-card__image-container {
558
+ max-height: 160px;
559
+ position: relative;
560
+ overflow: hidden;
561
+ border-top-left-radius: var(--ffe-v-cards-common-card-border-radius);
562
+ border-top-right-radius: var(--ffe-v-cards-common-card-border-radius);
563
+ }
564
+ .ffe-image-card__image {
565
+ max-width: 100%;
566
+ }
567
+ .ffe-image-card__image-overlay,
568
+ .ffe-image-card__body {
569
+ width: 100%;
570
+ overflow: hidden;
571
+ border: 2px solid transparent;
572
+ -webkit-transition: border-color var(--ffe-transition-duration);
573
+ -o-transition: border-color var(--ffe-transition-duration);
574
+ transition: border-color var(--ffe-transition-duration);
575
+ }
576
+ .ffe-image-card__image-overlay {
577
+ z-index: 10;
578
+ height: 100%;
579
+ border-bottom: 0;
580
+ border-top-left-radius: var(--ffe-v-cards-common-card-border-radius);
581
+ border-top-right-radius: var(--ffe-v-cards-common-card-border-radius);
582
+ position: absolute;
583
+ }
584
+ .ffe-image-card__body {
585
+ text-align: center;
586
+ padding: var(--ffe-spacing-sm) var(--ffe-spacing-sm) var(--ffe-spacing-xs) var(--ffe-spacing-sm);
587
+ border-top: 0;
588
+ border-bottom-left-radius: var(--ffe-v-cards-common-card-border-radius);
589
+ border-bottom-right-radius: var(--ffe-v-cards-common-card-border-radius);
590
+ min-height: 200px;
591
+ }
592
+ @media (min-width: 768px) {
593
+ .ffe-image-card .ffe-image-card__icon {
594
+ margin: 0 var(--ffe-spacing-md) 0;
595
+ }
596
+ }
597
+ @media (min-width: 1024px) {
598
+ .ffe-image-card .ffe-image-card__icon {
599
+ margin: 0 var(--ffe-spacing-lg) 0 var(--ffe-spacing-xs);
600
+ }
601
+ }
602
+ .ffe-stippled-card {
603
+ background: var(--ffe-v-cards-common-card-background-color);
604
+ -webkit-box-shadow: var(--ffe-v-cards-common-card-box-shadow);
605
+ box-shadow: var(--ffe-v-cards-common-card-box-shadow);
606
+ margin: 0 0 var(--ffe-spacing-xs);
607
+ border: 2px solid var(--ffe-v-cards-common-card-border-color);
608
+ border-radius: var(--ffe-v-cards-common-card-border-radius);
609
+ -webkit-transition: all var(--ffe-transition-duration) var(--ffe-ease);
610
+ -o-transition: all var(--ffe-transition-duration) var(--ffe-ease);
611
+ transition: all var(--ffe-transition-duration) var(--ffe-ease);
612
+ outline: none;
613
+ width: 100%;
614
+ text-decoration: none;
615
+ background: transparent;
616
+ border: 2px dashed var(--ffe-v-cards-stippled-border-color);
617
+ -webkit-box-shadow: none;
618
+ box-shadow: none;
619
+ display: -webkit-box;
620
+ display: -ms-flexbox;
621
+ display: flex;
622
+ -webkit-box-align: center;
623
+ -ms-flex-align: center;
624
+ align-items: center;
625
+ padding: var(--ffe-spacing-md);
626
+ gap: var(--ffe-spacing-md);
627
+ }
628
+ @media (min-width: 768px) {
629
+ .ffe-stippled-card {
630
+ margin-bottom: var(--ffe-spacing-md);
631
+ }
632
+ }
633
+ @media (hover: hover) and (pointer: fine) {
634
+ .ffe-stippled-card--clickable:hover {
635
+ cursor: pointer;
636
+ border-color: var(--ffe-g-primary-color);
637
+ }
638
+ .ffe-stippled-card--clickable:hover :where(
639
+ .ffe-card-body__card-name,
640
+ .ffe-card-body__title,
641
+ .ffe-card-body__subtext,
642
+ .ffe-card-body__text
643
+ ):has(.ffe-card__action) {
644
+ text-decoration: underline;
645
+ }
646
+ }
647
+ .ffe-stippled-card--clickable:focus-within {
648
+ border-color: var(--ffe-g-primary-color);
649
+ -webkit-box-shadow: 0 0 0 2px var(--ffe-g-primary-color);
650
+ box-shadow: 0 0 0 2px var(--ffe-g-primary-color);
651
+ }
652
+ .ffe-stippled-card--clickable:focus-within :where(
653
+ .ffe-card-body__card-name,
654
+ .ffe-card-body__title,
655
+ .ffe-card-body__subtext,
656
+ .ffe-card-body__text
657
+ ):has(.ffe-card__action) {
658
+ text-decoration: underline;
659
+ }
660
+ .ffe-stippled-card--clickable button.ffe-card__action--raw {
661
+ background: none;
662
+ color: inherit;
663
+ border: none;
664
+ padding: 0;
665
+ font: inherit;
666
+ cursor: pointer;
667
+ outline: inherit;
668
+ }
669
+ .ffe-stippled-card--clickable a.ffe-card__action--raw {
670
+ color: inherit;
671
+ text-decoration: inherit;
672
+ outline: inherit;
673
+ }
674
+ .ffe-stippled-card--clickable .ffe-card__action--raw:visited {
675
+ color: var(--ffe-v-cards-clickabe-card-link-visited-color);
676
+ }
677
+ .ffe-stippled-card--clickable:focus-within {
678
+ border-style: solid;
679
+ }
680
+ @media (hover: hover) and (pointer: fine) {
681
+ .ffe-stippled-card--clickable:hover {
682
+ border-style: solid;
683
+ }
684
+ }
685
+ .ffe-stippled-card--no-margin {
686
+ margin: 0;
687
+ }
688
+ .ffe-stippled-card__content {
689
+ -webkit-box-flex: 1;
690
+ -ms-flex-positive: 1;
691
+ flex-grow: 1;
692
+ }
693
+ .ffe-stippled-card__img {
694
+ -ms-flex-negative: 0;
695
+ flex-shrink: 0;
696
+ -webkit-box-flex: 0;
697
+ -ms-flex-positive: 0;
698
+ flex-grow: 0;
699
+ }
700
+ .ffe-stippled-card__img--icon {
701
+ margin: 0 var(--ffe-spacing-md);
702
+ display: -webkit-box;
703
+ display: -ms-flexbox;
704
+ display: flex;
705
+ }
706
+ .ffe-stippled-card--condensed {
707
+ padding: var(--ffe-spacing-sm);
708
+ gap: var(--ffe-spacing-sm);
709
+ }
710
+ .ffe-stippled-card--condensed .ffe-stippled-card__img--icon {
711
+ margin: 0;
712
+ }
713
+ .ffe-stippled-card .ffe-icons {
714
+ color: var(--ffe-v-cards-icon-color);
715
+ }
716
+ .ffe-group-card {
717
+ background: var(--ffe-v-cards-common-card-background-color);
718
+ -webkit-box-shadow: var(--ffe-v-cards-common-card-box-shadow);
719
+ box-shadow: var(--ffe-v-cards-common-card-box-shadow);
720
+ margin: 0 0 var(--ffe-spacing-xs);
721
+ border: 2px solid var(--ffe-v-cards-common-card-border-color);
722
+ border-radius: var(--ffe-v-cards-common-card-border-radius);
723
+ -webkit-transition: all var(--ffe-transition-duration) var(--ffe-ease);
724
+ -o-transition: all var(--ffe-transition-duration) var(--ffe-ease);
725
+ transition: all var(--ffe-transition-duration) var(--ffe-ease);
726
+ outline: none;
727
+ width: 100%;
728
+ text-decoration: none;
729
+ position: relative;
730
+ border: var(--ffe-v-cards-common-group-card-border);
731
+ -webkit-box-shadow: none;
732
+ box-shadow: none;
733
+ }
734
+ @media (min-width: 768px) {
735
+ .ffe-group-card {
736
+ margin-bottom: var(--ffe-spacing-md);
737
+ }
738
+ }
739
+ .ffe-group-card--bg-sand-30 {
740
+ --ffe-v-cards-common-card-background-color: var(--ffe-farge-sand-30);
741
+ }
742
+ .ffe-group-card--bg-sand-70 {
743
+ --ffe-v-cards-common-card-background-color: var(--ffe-farge-sand-70);
744
+ }
745
+ .ffe-group-card--bg-frost-30 {
746
+ --ffe-v-cards-common-card-background-color: var(--ffe-farge-frost-30);
747
+ }
748
+ .ffe-group-card--bg-syrin-30 {
749
+ --ffe-v-cards-common-card-background-color: var(--ffe-farge-syrin-30);
750
+ }
751
+ .ffe-group-card--bg-syrin-70 {
752
+ --ffe-v-cards-common-card-background-color: var(--ffe-farge-syrin-70);
753
+ }
754
+ .ffe-group-card--shadow {
755
+ -webkit-box-shadow: var(--ffe-v-cards-common-card-box-shadow);
756
+ box-shadow: var(--ffe-v-cards-common-card-box-shadow);
757
+ }
758
+ .ffe-group-card--no-margin {
759
+ margin: 0;
760
+ }
761
+ .ffe-group-card > :first-child {
762
+ border-radius: var(--ffe-v-cards-common-card-border-radius) var(--ffe-v-cards-common-card-border-radius) 0 0;
763
+ }
764
+ .ffe-group-card > :last-child {
765
+ border-radius: 0 0 var(--ffe-v-cards-common-card-border-radius) var(--ffe-v-cards-common-card-border-radius);
766
+ border-bottom-color: transparent;
767
+ }
768
+ .ffe-group-card > :first-child:last-child {
769
+ border-radius: var(--ffe-v-cards-common-card-border-radius);
770
+ }
771
+ .ffe-group-card__title :where(.ffe-h1, .ffe-h2, .ffe-h3, .ffe-h4, .ffe-h5, .ffe-h6) {
772
+ margin-bottom: 0;
773
+ }
774
+ .ffe-group-card__element {
775
+ padding: var(--ffe-spacing-md);
776
+ }
777
+ .ffe-group-card__footer {
778
+ background-color: var(--ffe-v-group-card-footer-background-color);
779
+ display: -webkit-box;
780
+ display: -ms-flexbox;
781
+ display: flex;
782
+ -webkit-box-pack: center;
783
+ -ms-flex-pack: center;
784
+ justify-content: center;
785
+ -webkit-box-align: center;
786
+ -ms-flex-align: center;
787
+ align-items: center;
788
+ }
789
+ .ffe-group-card__title,
790
+ .ffe-group-card__footer {
791
+ padding: var(--ffe-spacing-sm) var(--ffe-spacing-md);
792
+ }
793
+ .ffe-group-card__title,
794
+ .ffe-group-card__element,
795
+ .ffe-group-card__footer {
796
+ border: 1px solid transparent;
797
+ margin: 0;
798
+ -webkit-transition: all var(--ffe-transition-duration) var(--ffe-ease);
799
+ -o-transition: all var(--ffe-transition-duration) var(--ffe-ease);
800
+ transition: all var(--ffe-transition-duration) var(--ffe-ease);
801
+ position: relative;
802
+ z-index: 0;
803
+ }
804
+ .ffe-group-card__title--no-padding,
805
+ .ffe-group-card__element--no-padding,
806
+ .ffe-group-card__footer--no-padding {
807
+ padding: 0;
808
+ }
809
+ @media (hover: hover) and (pointer: fine) {
810
+ .ffe-group-card__title--clickable:hover,
811
+ .ffe-group-card__element--clickable:hover,
812
+ .ffe-group-card__footer--clickable:hover {
813
+ cursor: pointer;
814
+ border-color: var(--ffe-g-primary-color);
815
+ }
816
+ .ffe-group-card__title--clickable:hover :where(
817
+ .ffe-card-body__card-name,
818
+ .ffe-card-body__title,
819
+ .ffe-card-body__subtext,
820
+ .ffe-card-body__text
821
+ ):has(.ffe-card__action),
822
+ .ffe-group-card__element--clickable:hover :where(
823
+ .ffe-card-body__card-name,
824
+ .ffe-card-body__title,
825
+ .ffe-card-body__subtext,
826
+ .ffe-card-body__text
827
+ ):has(.ffe-card__action),
828
+ .ffe-group-card__footer--clickable:hover :where(
829
+ .ffe-card-body__card-name,
830
+ .ffe-card-body__title,
831
+ .ffe-card-body__subtext,
832
+ .ffe-card-body__text
833
+ ):has(.ffe-card__action) {
834
+ text-decoration: underline;
835
+ }
836
+ }
837
+ .ffe-group-card__title--clickable:focus-within,
838
+ .ffe-group-card__element--clickable:focus-within,
839
+ .ffe-group-card__footer--clickable:focus-within {
840
+ border-color: var(--ffe-g-primary-color);
841
+ -webkit-box-shadow: 0 0 0 2px var(--ffe-g-primary-color);
842
+ box-shadow: 0 0 0 2px var(--ffe-g-primary-color);
843
+ }
844
+ .ffe-group-card__title--clickable:focus-within :where(
845
+ .ffe-card-body__card-name,
846
+ .ffe-card-body__title,
847
+ .ffe-card-body__subtext,
848
+ .ffe-card-body__text
849
+ ):has(.ffe-card__action),
850
+ .ffe-group-card__element--clickable:focus-within :where(
851
+ .ffe-card-body__card-name,
852
+ .ffe-card-body__title,
853
+ .ffe-card-body__subtext,
854
+ .ffe-card-body__text
855
+ ):has(.ffe-card__action),
856
+ .ffe-group-card__footer--clickable:focus-within :where(
857
+ .ffe-card-body__card-name,
858
+ .ffe-card-body__title,
859
+ .ffe-card-body__subtext,
860
+ .ffe-card-body__text
861
+ ):has(.ffe-card__action) {
862
+ text-decoration: underline;
863
+ }
864
+ .ffe-group-card__title--clickable button.ffe-card__action--raw,
865
+ .ffe-group-card__element--clickable button.ffe-card__action--raw,
866
+ .ffe-group-card__footer--clickable button.ffe-card__action--raw {
867
+ background: none;
868
+ color: inherit;
869
+ border: none;
870
+ padding: 0;
871
+ font: inherit;
872
+ cursor: pointer;
873
+ outline: inherit;
874
+ }
875
+ .ffe-group-card__title--clickable a.ffe-card__action--raw,
876
+ .ffe-group-card__element--clickable a.ffe-card__action--raw,
877
+ .ffe-group-card__footer--clickable a.ffe-card__action--raw {
878
+ color: inherit;
879
+ text-decoration: inherit;
880
+ outline: inherit;
881
+ }
882
+ .ffe-group-card__title--clickable .ffe-card__action--raw:visited,
883
+ .ffe-group-card__element--clickable .ffe-card__action--raw:visited,
884
+ .ffe-group-card__footer--clickable .ffe-card__action--raw:visited {
885
+ color: var(--ffe-v-cards-clickabe-card-link-visited-color);
886
+ }
887
+ .ffe-group-card__title:focus-within,
888
+ .ffe-group-card__element:focus-within,
889
+ .ffe-group-card__footer:focus-within {
890
+ z-index: 1;
891
+ }
892
+ .ffe-group-card__title,
893
+ .ffe-group-card__element {
894
+ border-bottom-color: var(--ffe-v-cards-common-group-card-separation-border-color);
895
+ }
896
+ .ffe-group-card__title--no-separator,
897
+ .ffe-group-card__element--no-separator {
898
+ border-bottom-color: transparent;
899
+ }
900
+ @media (prefers-color-scheme: dark) {
901
+ .regard-color-scheme-preference .ffe-group-card--dm-bg-svart {
902
+ --ffe-v-cards-common-card-background-color: var(--ffe-farge-svart);
903
+ }
904
+ .regard-color-scheme-preference .ffe-group-card--dm-bg-natt {
905
+ --ffe-v-cards-common-card-background-color: var(--ffe-farge-natt);
906
+ }
907
+ .regard-color-scheme-preference .ffe-group-card--dm-bg-koksgraa {
908
+ --ffe-v-cards-common-card-background-color: var(--ffe-farge-koksgraa);
909
+ }
910
+ }
@@ -1,3 +1,5 @@
1
+ @import (reference) '@sb1/ffe-core/less/breakpoints';
2
+
1
3
  .common-card-styling() {
2
4
  background: var(--ffe-v-cards-common-card-background-color);
3
5
  box-shadow: var(--ffe-v-cards-common-card-box-shadow);
@@ -1,3 +1,5 @@
1
+ @import (reference) '@sb1/ffe-core/less/typography';
2
+
1
3
  .ffe-card-body {
2
4
  &__card-name {
3
5
  margin: 0 0 var(--ffe-spacing-2xs) 0;
@@ -1,3 +1,4 @@
1
+ @import (reference) '@sb1/ffe-core/less/breakpoints';
1
2
  @import 'common-card-styling';
2
3
  @import 'components';
3
4
 
@@ -1,3 +1,4 @@
1
+ @import (reference) '@sb1/ffe-core/less/breakpoints';
1
2
  @import 'common-card-styling';
2
3
  @import 'components';
3
4
 
@@ -25,15 +25,23 @@
25
25
  background: transparent;
26
26
  border: 2px dashed var(--ffe-v-cards-stippled-border-color);
27
27
  box-shadow: none;
28
- display: grid;
29
- grid-template-columns: auto 1fr;
28
+ display: flex;
30
29
  align-items: center;
31
30
  padding: var(--ffe-spacing-md);
32
31
  gap: var(--ffe-spacing-md);
33
32
  }
34
33
 
34
+ .ffe-stippled-card__content {
35
+ flex-grow: 1;
36
+ }
37
+ .ffe-stippled-card__img {
38
+ flex-shrink: 0;
39
+ flex-grow: 0;
40
+ }
41
+
35
42
  .ffe-stippled-card__img--icon {
36
43
  margin: 0 var(--ffe-spacing-md);
44
+ display: flex;
37
45
  }
38
46
 
39
47
  .ffe-stippled-card--condensed {
@@ -1,3 +1,4 @@
1
+ @import (reference) '@sb1/ffe-core/less/breakpoints';
1
2
  @import 'common-card-styling';
2
3
  @import 'components';
3
4
 
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@sb1/ffe-cards",
3
- "version": "20.2.3",
3
+ "version": "20.4.0",
4
4
  "description": "Kort for bruk i oversikter",
5
5
  "license": "MIT",
6
6
  "author": "SpareBank 1",
7
7
  "files": [
8
- "less"
8
+ "less",
9
+ "css"
9
10
  ],
10
11
  "repository": {
11
12
  "type": "git",
@@ -13,10 +14,11 @@
13
14
  },
14
15
  "scripts": {
15
16
  "lint": "ffe-buildtool stylelint less/*.less",
16
- "test": "npm run lint"
17
+ "test": "npm run lint",
18
+ "build": "lessc less/cards.less css/cards.css --autoprefix"
17
19
  },
18
20
  "dependencies": {
19
- "@sb1/ffe-core": "^29.1.4"
21
+ "@sb1/ffe-core": "^29.2.0"
20
22
  },
21
23
  "devDependencies": {
22
24
  "@sb1/ffe-buildtool": "^0.9.0"
@@ -24,5 +26,5 @@
24
26
  "publishConfig": {
25
27
  "access": "public"
26
28
  },
27
- "gitHead": "d27089e01efb5feed58df9f4acd48981a8dd9e6f"
29
+ "gitHead": "81f7edd286dfdd1d30337476d0dda33bd37e003f"
28
30
  }