|
1 | 1 | /* Demo-specific styles for Spacing stories */ |
2 | 2 |
|
3 | | -.flex { |
| 3 | +.spacing-demo-box { |
| 4 | + display: inline-flex; |
| 5 | + align-items: center; |
| 6 | + justify-content: center; |
| 7 | + background-color: var(--eds-color-bg-accent-fill-muted-default); |
| 8 | + border: 1px solid var(--eds-color-border-accent-medium); |
| 9 | + color: var(--eds-color-text-accent-strong); |
| 10 | + text-align: center; |
| 11 | + white-space: nowrap; |
| 12 | + width: fit-content; |
| 13 | + min-width: 80px; |
| 14 | + font-size: 0.875rem; |
| 15 | + font-weight: 500; |
| 16 | +} |
| 17 | + |
| 18 | +.spacing-demo-container { |
| 19 | + display: flex; |
| 20 | + flex-direction: column; |
| 21 | + gap: 1rem; |
| 22 | + margin-bottom: 2rem; |
| 23 | +} |
| 24 | + |
| 25 | +.spacing-demo-row { |
4 | 26 | display: flex; |
| 27 | + flex-wrap: wrap; |
| 28 | + gap: 2rem; |
| 29 | + align-items: flex-start; |
5 | 30 | } |
6 | 31 |
|
7 | | -.flex-col { |
| 32 | +.spacing-demo-item { |
| 33 | + display: flex; |
8 | 34 | flex-direction: column; |
| 35 | + gap: 0.5rem; |
9 | 36 | } |
10 | 37 |
|
11 | | -.flex-row { |
12 | | - flex-direction: row; |
| 38 | +.spacing-demo-label { |
| 39 | + font-size: 0.875rem; |
| 40 | + color: var(--eds-color-text-neutral-strong); |
| 41 | + font-family: monospace; |
13 | 42 | } |
14 | 43 |
|
15 | | -.flex-wrap { |
16 | | - flex-wrap: wrap; |
| 44 | +.spacing-demo-section { |
| 45 | + margin-bottom: 3rem; |
17 | 46 | } |
18 | 47 |
|
19 | | -.items-start { |
20 | | - align-items: flex-start; |
| 48 | +/* Selectable space examples */ |
| 49 | +.selectable-space-box { |
| 50 | + padding: var(--eds-selectable-space-vertical) |
| 51 | + var(--eds-selectable-space-horizontal); |
| 52 | +} |
| 53 | + |
| 54 | +/* Container space examples */ |
| 55 | +.container-space-box { |
| 56 | + padding: var(--eds-container-space-vertical) |
| 57 | + var(--eds-container-space-horizontal); |
21 | 58 | } |
22 | 59 |
|
23 | | -/* Margin-bottom utilities (4px grid) */ |
24 | | -.mb-2 { |
25 | | - margin-bottom: 0.5rem; /* 8px */ |
| 60 | +/* Page space examples */ |
| 61 | +.page-space-box { |
| 62 | + padding: var(--eds-page-space-vertical) var(--eds-page-space-horizontal); |
26 | 63 | } |
27 | 64 |
|
28 | | -.mb-3 { |
29 | | - margin-bottom: 0.75rem; /* 12px */ |
| 65 | +/* Generic gap examples */ |
| 66 | +.generic-gap-horizontal { |
| 67 | + display: flex; |
| 68 | + flex-direction: row; |
| 69 | + gap: 0 var(--eds-generic-gap-horizontal); |
30 | 70 | } |
31 | 71 |
|
32 | | -.mb-4 { |
33 | | - margin-bottom: 1rem; /* 16px */ |
| 72 | +.generic-gap-vertical { |
| 73 | + display: flex; |
| 74 | + flex-direction: column; |
| 75 | + gap: var(--eds-generic-gap-vertical) 0; |
34 | 76 | } |
35 | 77 |
|
36 | | -.spacing-demo-box { |
37 | | - display: inline-block; |
38 | | - background-color: var(--eds-color-bg-accent-fill-muted-default); |
39 | | - border: 1px solid var(--eds-color-border-accent-medium); |
40 | | - color: var(--eds-color-text-accent-strong); |
41 | | - text-align: center; |
42 | | - white-space: nowrap; |
43 | | - width: fit-content; |
44 | | - max-width: 100%; |
| 78 | +.generic-gap-both { |
| 79 | + display: flex; |
| 80 | + flex-wrap: wrap; |
| 81 | + gap: var(--eds-generic-gap-vertical) var(--eds-generic-gap-horizontal); |
45 | 82 | } |
46 | 83 |
|
47 | | -.size-32 { |
48 | | - width: 32px; |
49 | | - height: 32px; |
| 84 | +/* Generic space examples */ |
| 85 | +.generic-space-horizontal { |
| 86 | + padding-left: var(--eds-generic-space-horizontal); |
| 87 | + padding-right: var(--eds-generic-space-horizontal); |
50 | 88 | } |
51 | 89 |
|
52 | | -.spacing-demo-button-primary, |
53 | | -.spacing-demo-button-secondary { |
54 | | - border-width: 1px; |
55 | | - border-style: solid; |
56 | | - cursor: pointer; |
| 90 | +.generic-space-vertical { |
| 91 | + padding-top: var(--eds-generic-space-vertical); |
| 92 | + padding-bottom: var(--eds-generic-space-vertical); |
57 | 93 | } |
58 | 94 |
|
59 | | -.spacing-demo-button-primary { |
60 | | - background-color: var(--eds-color-bg-accent-fill-emphasis-default); |
61 | | - color: var(--eds-color-text-accent-strong-on-emphasis); |
62 | | - border-color: var(--eds-color-border-accent-strong); |
| 95 | +.generic-space-both { |
| 96 | + padding: var(--eds-generic-space-vertical) var(--eds-generic-space-horizontal); |
63 | 97 | } |
64 | 98 |
|
65 | | -.spacing-demo-button-secondary { |
66 | | - background-color: var(--eds-color-bg-neutral-surface); |
67 | | - color: var(--eds-color-text-neutral-strong); |
68 | | - border-color: var(--eds-color-border-neutral-medium); |
| 99 | +/* Fixed gap examples */ |
| 100 | +.selectable-gap-example { |
| 101 | + display: flex; |
| 102 | + flex-wrap: wrap; |
| 103 | + gap: var(--eds-selectable-gap-vertical) var(--eds-selectable-gap-horizontal); |
69 | 104 | } |
70 | 105 |
|
71 | | -.spacing-demo-button-primary:hover, |
72 | | -.spacing-demo-button-secondary:hover { |
73 | | - opacity: 0.9; |
| 106 | +.container-gap-example { |
| 107 | + display: flex; |
| 108 | + flex-direction: column; |
| 109 | + gap: var(--eds-container-gap-vertical) var(--eds-container-gap-horizontal); |
| 110 | +} |
| 111 | + |
| 112 | +.page-gap-example { |
| 113 | + display: flex; |
| 114 | + flex-direction: column; |
| 115 | + gap: var(--eds-page-gap-vertical) var(--eds-page-gap-horizontal); |
74 | 116 | } |
75 | 117 |
|
76 | | -.spacing-demo-card { |
77 | | - background-color: var(--eds-color-bg-neutral-surface); |
78 | | - border: 1px solid var(--eds-color-border-neutral-medium); |
79 | | - max-width: 400px; |
| 118 | +/* Small box for gap demonstrations */ |
| 119 | +.spacing-demo-small-box { |
| 120 | + width: 60px; |
| 121 | + height: 40px; |
| 122 | + background-color: var(--eds-color-bg-info-fill-muted-default); |
| 123 | + border: 1px solid var(--eds-color-border-info-medium); |
| 124 | + display: inline-flex; |
| 125 | + align-items: center; |
| 126 | + justify-content: center; |
| 127 | + font-size: 0.75rem; |
| 128 | + color: var(--eds-color-text-info-strong); |
80 | 129 | } |
0 commit comments