|
1 | 1 | /* Demo-specific styles for Spacing stories */ |
2 | 2 |
|
3 | | -/* Container styles */ |
4 | | -.spacing-demo-container { |
| 3 | +.flex { |
5 | 4 | display: flex; |
6 | | - flex-direction: column; |
7 | | - gap: 2rem; |
8 | | -} |
9 | | - |
10 | | -.spacing-demo-row { |
11 | | - display: flex; |
12 | | - flex-direction: row; |
13 | | - flex-wrap: wrap; |
14 | | - gap: 1.5rem; |
15 | | -} |
16 | | - |
17 | | -.spacing-demo-item { |
18 | | - display: flex; |
19 | | - flex-direction: column; |
20 | | - gap: 0.5rem; |
21 | | - min-width: 120px; |
22 | 5 | } |
23 | 6 |
|
24 | | -.spacing-demo-density-section { |
25 | | - display: flex; |
| 7 | +.flex-col { |
26 | 8 | flex-direction: column; |
27 | | - gap: 2rem; |
28 | 9 | } |
29 | 10 |
|
30 | | -.spacing-demo-density-container { |
31 | | - display: flex; |
32 | | - flex-direction: column; |
33 | | - gap: 1rem; |
34 | | -} |
35 | | - |
36 | | -.spacing-demo-flex { |
37 | | - display: flex; |
| 11 | +.flex-row { |
38 | 12 | flex-direction: row; |
39 | 13 | } |
40 | 14 |
|
41 | | -/* Typography styles */ |
42 | | -.spacing-demo-heading { |
43 | | - margin: 0 0 1rem 0; |
44 | | - font-size: 1.5rem; |
45 | | - font-weight: 600; |
| 15 | +.flex-wrap { |
| 16 | + flex-wrap: wrap; |
46 | 17 | } |
47 | 18 |
|
48 | | -.spacing-demo-subheading { |
49 | | - margin: 0 0 0.75rem 0; |
50 | | - font-size: 1.125rem; |
51 | | - font-weight: 600; |
| 19 | +.items-start { |
| 20 | + align-items: flex-start; |
52 | 21 | } |
53 | 22 |
|
54 | | -.spacing-demo-label { |
55 | | - margin: 0 0 0.5rem 0; |
56 | | - font-size: 0.875rem; |
57 | | - color: var(--eds-color-text-neutral-subtle); |
| 23 | +/* Margin-bottom utilities (4px grid) */ |
| 24 | +.mb-2 { |
| 25 | + margin-bottom: 0.5rem; /* 8px */ |
58 | 26 | } |
59 | 27 |
|
60 | | -.spacing-demo-text { |
61 | | - margin: 0 0 1rem 0; |
62 | | - font-size: 0.875rem; |
63 | | - color: var(--eds-color-text-neutral-subtle); |
| 28 | +.mb-3 { |
| 29 | + margin-bottom: 0.75rem; /* 12px */ |
64 | 30 | } |
65 | 31 |
|
66 | | -/* Box demo styles */ |
67 | | -.spacing-demo-box-container { |
68 | | - display: flex; |
69 | | - flex-direction: row; |
70 | | - align-items: center; |
71 | | -} |
72 | | - |
73 | | -.spacing-demo-box-container-column { |
74 | | - display: flex; |
75 | | - flex-direction: column; |
| 32 | +.mb-4 { |
| 33 | + margin-bottom: 1rem; /* 16px */ |
76 | 34 | } |
77 | 35 |
|
78 | 36 | .spacing-demo-box { |
79 | | - width: 40px; |
80 | | - height: 40px; |
81 | | - background-color: var(--eds-color-bg-accent-fill-emphasis-default); |
82 | | - border: 1px solid var(--eds-color-border-accent-strong); |
83 | | -} |
84 | | - |
85 | | -.spacing-demo-box-horizontal { |
86 | | - width: 100%; |
87 | | - height: 40px; |
88 | | - background-color: var(--eds-color-bg-accent-fill-emphasis-default); |
89 | | - border: 1px solid var(--eds-color-border-accent-strong); |
90 | | -} |
91 | | - |
92 | | -/* Inset demo styles */ |
93 | | -.spacing-demo-inset { |
94 | 37 | display: inline-block; |
95 | | - background-color: var(--eds-color-bg-neutral-fill-muted-default); |
96 | | - border: 1px solid var(--eds-color-border-neutral-medium); |
97 | | - color: var(--eds-color-text-neutral-strong); |
| 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); |
98 | 41 | text-align: center; |
99 | 42 | white-space: nowrap; |
| 43 | + width: fit-content; |
| 44 | + max-width: 100%; |
100 | 45 | } |
101 | 46 |
|
102 | | -/* Border radius demo styles */ |
103 | | -.spacing-demo-border-none, |
104 | | -.spacing-demo-border-rounded, |
105 | | -.spacing-demo-border-pill { |
106 | | - display: inline-block; |
107 | | - padding: 0.75rem 1.5rem; |
108 | | - background-color: var(--eds-color-bg-neutral-fill-muted-default); |
109 | | - border: 1px solid var(--eds-color-border-neutral-medium); |
110 | | - color: var(--eds-color-text-neutral-strong); |
111 | | - text-align: center; |
112 | | - font-size: 0.875rem; |
113 | | -} |
114 | | - |
115 | | -/* Icon demo styles */ |
116 | | -.spacing-demo-icon { |
117 | | - display: flex; |
118 | | - flex-direction: row; |
119 | | - align-items: center; |
| 47 | +.size-32 { |
| 48 | + width: 32px; |
| 49 | + height: 32px; |
120 | 50 | } |
121 | 51 |
|
122 | | -.spacing-demo-icon-box { |
123 | | - width: 1em; |
124 | | - height: 1em; |
125 | | - background-color: var(--eds-color-bg-accent-fill-emphasis-default); |
126 | | - border: 1px solid var(--eds-color-border-accent-strong); |
127 | | - flex-shrink: 0; |
128 | | -} |
129 | | - |
130 | | -.spacing-demo-icon-xs { |
131 | | - font-size: 0.75rem; |
132 | | -} |
133 | | - |
134 | | -.spacing-demo-icon-sm { |
135 | | - font-size: 0.875rem; |
136 | | -} |
137 | | - |
138 | | -.spacing-demo-icon-md { |
139 | | - font-size: 1rem; |
140 | | -} |
141 | | - |
142 | | -.spacing-demo-icon-lg { |
143 | | - font-size: 1.125rem; |
144 | | -} |
145 | | - |
146 | | -.spacing-demo-icon-xl { |
147 | | - font-size: 1.25rem; |
148 | | -} |
149 | | - |
150 | | -.spacing-demo-icon-2xl { |
151 | | - font-size: 1.5rem; |
| 52 | +.spacing-demo-button-primary, |
| 53 | +.spacing-demo-button-secondary { |
| 54 | + border-width: 1px; |
| 55 | + border-style: solid; |
| 56 | + cursor: pointer; |
152 | 57 | } |
153 | 58 |
|
154 | | -/* Button demo styles */ |
155 | 59 | .spacing-demo-button-primary { |
156 | 60 | background-color: var(--eds-color-bg-accent-fill-emphasis-default); |
157 | 61 | color: var(--eds-color-text-accent-strong-on-emphasis); |
158 | | - border: 1px solid var(--eds-color-border-accent-strong); |
159 | | - cursor: pointer; |
| 62 | + border-color: var(--eds-color-border-accent-strong); |
160 | 63 | } |
161 | 64 |
|
162 | 65 | .spacing-demo-button-secondary { |
163 | 66 | background-color: var(--eds-color-bg-neutral-surface); |
164 | 67 | color: var(--eds-color-text-neutral-strong); |
165 | | - border: 1px solid var(--eds-color-border-neutral-medium); |
166 | | - cursor: pointer; |
| 68 | + border-color: var(--eds-color-border-neutral-medium); |
167 | 69 | } |
168 | 70 |
|
169 | 71 | .spacing-demo-button-primary:hover, |
170 | 72 | .spacing-demo-button-secondary:hover { |
171 | 73 | opacity: 0.9; |
172 | 74 | } |
173 | 75 |
|
174 | | -/* Card demo styles */ |
175 | 76 | .spacing-demo-card { |
176 | 77 | background-color: var(--eds-color-bg-neutral-surface); |
177 | 78 | border: 1px solid var(--eds-color-border-neutral-medium); |
178 | 79 | max-width: 400px; |
179 | 80 | } |
180 | | - |
181 | | -.spacing-demo-card-content { |
182 | | - display: flex; |
183 | | - flex-direction: column; |
184 | | -} |
185 | | - |
186 | | -.spacing-demo-card-title { |
187 | | - margin: 0; |
188 | | - font-size: 1.125rem; |
189 | | - font-weight: 600; |
190 | | - color: var(--eds-color-text-neutral-strong); |
191 | | -} |
192 | | - |
193 | | -.spacing-demo-card-text { |
194 | | - margin: 0; |
195 | | - font-size: 0.875rem; |
196 | | - color: var(--eds-color-text-neutral-subtle); |
197 | | -} |
198 | | - |
199 | | -.spacing-demo-card-actions { |
200 | | - display: flex; |
201 | | - flex-direction: row; |
202 | | -} |
203 | | - |
204 | | -/* Form demo styles */ |
205 | | -.spacing-demo-form { |
206 | | - display: flex; |
207 | | - flex-direction: column; |
208 | | - max-width: 300px; |
209 | | -} |
210 | | - |
211 | | -.spacing-demo-form-field { |
212 | | - display: flex; |
213 | | - flex-direction: column; |
214 | | -} |
215 | | - |
216 | | -.spacing-demo-form-label { |
217 | | - margin: 0 0 0.25rem 0; |
218 | | - font-size: 0.875rem; |
219 | | - font-weight: 500; |
220 | | - color: var(--eds-color-text-neutral-strong); |
221 | | -} |
222 | | - |
223 | | -.spacing-demo-form-input { |
224 | | - background-color: var(--eds-color-bg-input); |
225 | | - border: 1px solid var(--eds-color-border-neutral-medium); |
226 | | - color: var(--eds-color-text-neutral-strong); |
227 | | - font-size: 0.875rem; |
228 | | - outline: none; |
229 | | -} |
230 | | - |
231 | | -.spacing-demo-form-input:focus { |
232 | | - border-color: var(--eds-color-border-focus); |
233 | | -} |
234 | | - |
235 | | -.spacing-demo-form-submit { |
236 | | - background-color: var(--eds-color-bg-accent-fill-emphasis-default); |
237 | | - color: var(--eds-color-text-accent-strong-on-emphasis); |
238 | | - border: 1px solid var(--eds-color-border-accent-strong); |
239 | | - cursor: pointer; |
240 | | -} |
241 | | - |
242 | | -.spacing-demo-form-submit:hover { |
243 | | - opacity: 0.9; |
244 | | -} |
245 | | - |
246 | | -/* Navigation demo styles */ |
247 | | -.spacing-demo-nav { |
248 | | - background-color: var(--eds-color-bg-neutral-surface); |
249 | | - border: 1px solid var(--eds-color-border-neutral-medium); |
250 | | - max-width: 200px; |
251 | | -} |
252 | | - |
253 | | -.spacing-demo-nav-list { |
254 | | - margin: 0; |
255 | | - padding: 0; |
256 | | - list-style: none; |
257 | | - display: flex; |
258 | | - flex-direction: column; |
259 | | -} |
260 | | - |
261 | | -.spacing-demo-nav-item { |
262 | | - display: block; |
263 | | - padding: 0.5rem; |
264 | | - color: var(--eds-color-text-link); |
265 | | - text-decoration: none; |
266 | | - font-size: 0.875rem; |
267 | | -} |
268 | | - |
269 | | -.spacing-demo-nav-item:hover { |
270 | | - background-color: var(--eds-color-bg-neutral-fill-muted-default); |
271 | | -} |
0 commit comments