@semanticus/semanticus-css 0.3.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/LICENSE +21 -0
- package/NOTICE +53 -0
- package/README.md +151 -0
- package/dist/semanticus-semantics.css +2 -0
- package/dist/semanticus-utilities.css +7 -0
- package/dist/semanticus-variants.css +1 -0
- package/dist/semanticus.css +7 -0
- package/dist/semanticus.palette.amber.css +1 -0
- package/dist/semanticus.palette.blue.css +1 -0
- package/dist/semanticus.palette.cyan.css +1 -0
- package/dist/semanticus.palette.fuchsia.css +1 -0
- package/dist/semanticus.palette.green.css +1 -0
- package/dist/semanticus.palette.grey.css +1 -0
- package/dist/semanticus.palette.indigo.css +1 -0
- package/dist/semanticus.palette.jade.css +1 -0
- package/dist/semanticus.palette.lime.css +1 -0
- package/dist/semanticus.palette.orange.css +1 -0
- package/dist/semanticus.palette.pink.css +1 -0
- package/dist/semanticus.palette.pumpkin.css +1 -0
- package/dist/semanticus.palette.purple.css +1 -0
- package/dist/semanticus.palette.red.css +1 -0
- package/dist/semanticus.palette.sand.css +1 -0
- package/dist/semanticus.palette.slate.css +1 -0
- package/dist/semanticus.palette.violet.css +1 -0
- package/dist/semanticus.palette.yellow.css +1 -0
- package/dist/semanticus.palette.zinc.css +1 -0
- package/dist/semanticus.size.slim.css +1 -0
- package/package.json +102 -0
- package/src/_normalize.css +214 -0
- package/src/_variables.css +863 -0
- package/src/index.css +20 -0
- package/src/palettes/amber.css +56 -0
- package/src/palettes/blue.css +56 -0
- package/src/palettes/cyan.css +56 -0
- package/src/palettes/fuchsia.css +56 -0
- package/src/palettes/green.css +56 -0
- package/src/palettes/grey.css +56 -0
- package/src/palettes/indigo.css +56 -0
- package/src/palettes/jade.css +56 -0
- package/src/palettes/lime.css +56 -0
- package/src/palettes/orange.css +56 -0
- package/src/palettes/pink.css +56 -0
- package/src/palettes/pumpkin.css +56 -0
- package/src/palettes/purple.css +56 -0
- package/src/palettes/red.css +56 -0
- package/src/palettes/sand.css +56 -0
- package/src/palettes/slate.css +56 -0
- package/src/palettes/violet.css +56 -0
- package/src/palettes/yellow.css +56 -0
- package/src/palettes/zinc.css +56 -0
- package/src/semantics/_aria-busy.css +34 -0
- package/src/semantics/_article.css +6 -0
- package/src/semantics/_body.css +10 -0
- package/src/semantics/_button.css +106 -0
- package/src/semantics/_code.css +50 -0
- package/src/semantics/_details.css +292 -0
- package/src/semantics/_dialog.css +163 -0
- package/src/semantics/_document.css +18 -0
- package/src/semantics/_embedded.css +41 -0
- package/src/semantics/_figure.css +13 -0
- package/src/semantics/_hidden.css +7 -0
- package/src/semantics/_hr.css +10 -0
- package/src/semantics/_input.css +306 -0
- package/src/semantics/_links.css +33 -0
- package/src/semantics/_main.css +3 -0
- package/src/semantics/_nav.css +116 -0
- package/src/semantics/_progress.css +62 -0
- package/src/semantics/_role-group-search.css +129 -0
- package/src/semantics/_role-toolbar.css +17 -0
- package/src/semantics/_role-tooltip.css +138 -0
- package/src/semantics/_section.css +6 -0
- package/src/semantics/_table.css +28 -0
- package/src/semantics/_type-checkbox-radio.css +142 -0
- package/src/semantics/_type-color.css +22 -0
- package/src/semantics/_type-date.css +40 -0
- package/src/semantics/_type-file.css +26 -0
- package/src/semantics/_type-range.css +90 -0
- package/src/semantics/_type-search.css +34 -0
- package/src/semantics/_typography.css +137 -0
- package/src/semantics/index.css +14 -0
- package/src/semantics/modules.css +35 -0
- package/src/sizes/slim.css +12 -0
- package/src/utilities/_variables.css +244 -0
- package/src/utilities/borders/_border-radius.css +216 -0
- package/src/utilities/borders/_border-style.css +39 -0
- package/src/utilities/borders/_border-width.css +39 -0
- package/src/utilities/colors/_background-colors.css +209 -0
- package/src/utilities/colors/_border-colors.css +69 -0
- package/src/utilities/colors/_text-colors.css +371 -0
- package/src/utilities/display/_display.css +259 -0
- package/src/utilities/display/_overflow.css +47 -0
- package/src/utilities/display/_visibility.css +27 -0
- package/src/utilities/effects/_opacity.css +19 -0
- package/src/utilities/effects/_shadows.css +48 -0
- package/src/utilities/effects/_transforms.css +11 -0
- package/src/utilities/index.css +14 -0
- package/src/utilities/layout/_flexbox.css +846 -0
- package/src/utilities/layout/_grid.css +51 -0
- package/src/utilities/layout/_misc.css +77 -0
- package/src/utilities/media/_object-fit.css +139 -0
- package/src/utilities/modules.css +56 -0
- package/src/utilities/positioning/_floats.css +72 -0
- package/src/utilities/positioning/_inset.css +47 -0
- package/src/utilities/positioning/_position.css +108 -0
- package/src/utilities/positioning/_z-index.css +19 -0
- package/src/utilities/sizing/_height.css +31 -0
- package/src/utilities/sizing/_width.css +31 -0
- package/src/utilities/spacing/_gap.css +393 -0
- package/src/utilities/spacing/_margin.css +1030 -0
- package/src/utilities/spacing/_padding.css +885 -0
- package/src/utilities/typography/_font-family.css +7 -0
- package/src/utilities/typography/_font-sizes.css +38 -0
- package/src/utilities/typography/_font-weight.css +51 -0
- package/src/utilities/typography/_text-alignment.css +141 -0
- package/src/variants/_card.css +41 -0
- package/src/variants/_container.css +36 -0
- package/src/variants/_contrast.css +50 -0
- package/src/variants/_ghost.css +58 -0
- package/src/variants/_secondary.css +38 -0
- package/src/variants/_striped.css +10 -0
- package/src/variants/index.css +6 -0
- package/src/variants/modules.css +12 -0
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accordion (<details>)
|
|
3
|
+
*/
|
|
4
|
+
details {
|
|
5
|
+
display: block;
|
|
6
|
+
margin-bottom: var(--spacing);
|
|
7
|
+
|
|
8
|
+
& summary {
|
|
9
|
+
line-height: 1rem;
|
|
10
|
+
list-style-type: none;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
transition: color var(--transition);
|
|
13
|
+
|
|
14
|
+
&:not([role]) {
|
|
15
|
+
color: var(--accordion-closed-summary);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&::-webkit-details-marker {
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&::marker {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&::-moz-list-bullet {
|
|
27
|
+
list-style-type: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&::after {
|
|
31
|
+
display: block;
|
|
32
|
+
width: 1rem;
|
|
33
|
+
height: 1rem;
|
|
34
|
+
margin-inline-start: calc(var(--spacing, 1rem) * 0.5);
|
|
35
|
+
float: right;
|
|
36
|
+
transform: rotate(-90deg);
|
|
37
|
+
background-image: var(--icon-chevron);
|
|
38
|
+
background-position: right center;
|
|
39
|
+
background-size: 1rem auto;
|
|
40
|
+
background-repeat: no-repeat;
|
|
41
|
+
content: "";
|
|
42
|
+
transition: transform var(--transition);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:focus {
|
|
46
|
+
outline: none;
|
|
47
|
+
|
|
48
|
+
&:not([role]) {
|
|
49
|
+
color: var(--accordion-active-summary);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:focus-visible:not([role]) {
|
|
54
|
+
outline: var(--outline-width) solid var(--color-primary-focus);
|
|
55
|
+
outline-offset: calc(var(--spacing, 1rem) * 0.5);
|
|
56
|
+
color: var(--color-primary);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&[role=button] {
|
|
60
|
+
width: 100%;
|
|
61
|
+
text-align: left;
|
|
62
|
+
|
|
63
|
+
&:focus-visible {
|
|
64
|
+
outline: var(--outline-width) solid var(--color-primary-focus);
|
|
65
|
+
outline-offset: calc(var(--spacing, 1rem) * 0.5);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&::after {
|
|
69
|
+
height: calc(1rem * var(--line-height, 1.5));
|
|
70
|
+
filter: brightness(0) invert(1);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&[open] > summary {
|
|
76
|
+
margin-bottom: var(--spacing);
|
|
77
|
+
|
|
78
|
+
&:not([role]):not(:focus) {
|
|
79
|
+
color: var(--accordion-open-summary);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&::after {
|
|
83
|
+
transform: rotate(0);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
[dir=rtl] details summary {
|
|
89
|
+
text-align: right;
|
|
90
|
+
|
|
91
|
+
&::after {
|
|
92
|
+
float: left;
|
|
93
|
+
background-position: left center;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Dropdown (details with summary[aria-haspopup="menu"])
|
|
99
|
+
*/
|
|
100
|
+
details:has(> summary[aria-haspopup="menu"]) {
|
|
101
|
+
position: relative;
|
|
102
|
+
border-bottom: none;
|
|
103
|
+
|
|
104
|
+
& > summary::after,
|
|
105
|
+
& > button::after,
|
|
106
|
+
& > a::after {
|
|
107
|
+
display: block;
|
|
108
|
+
width: 1rem;
|
|
109
|
+
height: calc(1rem * var(--line-height, 1.5));
|
|
110
|
+
margin-inline-start: 0.25rem;
|
|
111
|
+
margin-left: auto;
|
|
112
|
+
float: right;
|
|
113
|
+
transform: rotate(0deg) translateX(0.2rem);
|
|
114
|
+
background-image: var(--icon-chevron);
|
|
115
|
+
background-position: right center;
|
|
116
|
+
background-size: 1rem auto;
|
|
117
|
+
background-repeat: no-repeat;
|
|
118
|
+
content: "";
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
& summary:not([role="button"]) {
|
|
122
|
+
--outline-width: 0.0625rem;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
& > :where(summary:not([role])) {
|
|
126
|
+
display: flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
height: calc(1rem * var(--line-height) + var(--form-element-spacing-vertical) * 2 + var(--border-width) * 2);
|
|
129
|
+
padding: var(--form-element-spacing-vertical) var(--form-element-spacing-horizontal);
|
|
130
|
+
border: var(--border-width) solid var(--form-border-color);
|
|
131
|
+
border-radius: var(--border-radius);
|
|
132
|
+
background-color: var(--form-bg);
|
|
133
|
+
color: var(--form-placeholder-color);
|
|
134
|
+
line-height: inherit;
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
user-select: none;
|
|
137
|
+
transition: background-color var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
& > :where(summary:not([role]):active, summary:not([role]):focus) {
|
|
141
|
+
border-color: var(--form-active-border);
|
|
142
|
+
background-color: var(--form-active-bg);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
& > :where(summary:not([role]):focus) {
|
|
146
|
+
box-shadow: 0 0 0 var(--outline-width) var(--form-focus);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
& > :where(summary:not([role]):focus-visible) {
|
|
150
|
+
outline: none;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
& > :where(summary:not([role])[aria-invalid=false]) {
|
|
154
|
+
--form-border-color: var(--form-valid-border);
|
|
155
|
+
--form-active-border: var(--form-valid-focus);
|
|
156
|
+
--form-focus: var(--form-valid-focus);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
& > :where(summary:not([role])[aria-invalid=true]) {
|
|
160
|
+
--form-border-color: var(--form-invalid-border);
|
|
161
|
+
--form-active-border: var(--form-invalid-focus);
|
|
162
|
+
--form-focus: var(--form-invalid-focus);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
& > :where(summary + ul[role="menu"]) {
|
|
166
|
+
display: flex;
|
|
167
|
+
z-index: 99;
|
|
168
|
+
position: absolute;
|
|
169
|
+
left: 0;
|
|
170
|
+
flex-direction: column;
|
|
171
|
+
width: 100%;
|
|
172
|
+
min-width: fit-content;
|
|
173
|
+
margin: 0;
|
|
174
|
+
margin-top: var(--outline-width);
|
|
175
|
+
padding: 0;
|
|
176
|
+
border: var(--border-width) solid var(--dropdown-border);
|
|
177
|
+
border-radius: var(--border-radius);
|
|
178
|
+
background-color: var(--dropdown-bg);
|
|
179
|
+
box-shadow: var(--dropdown-shadow);
|
|
180
|
+
color: var(--dropdown-text);
|
|
181
|
+
white-space: nowrap;
|
|
182
|
+
opacity: 0;
|
|
183
|
+
transition: opacity var(--transition), transform 0s ease-in-out 1s;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
& > :where(summary + ul[role="menu"][dir=rtl]) {
|
|
187
|
+
right: 0;
|
|
188
|
+
left: auto;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
& > summary + ul[role="menu"] li {
|
|
192
|
+
width: 100%;
|
|
193
|
+
margin-bottom: 0;
|
|
194
|
+
padding: calc(var(--form-element-spacing-vertical) * 0.5) var(--form-element-spacing-horizontal);
|
|
195
|
+
list-style: none;
|
|
196
|
+
|
|
197
|
+
&:first-of-type {
|
|
198
|
+
margin-top: calc(var(--form-element-spacing-vertical) * 0.5);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
&:last-of-type {
|
|
202
|
+
margin-bottom: calc(var(--form-element-spacing-vertical) * 0.5);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
& a {
|
|
206
|
+
display: block;
|
|
207
|
+
margin: calc(var(--form-element-spacing-vertical) * -0.5) calc(var(--form-element-spacing-horizontal) * -1);
|
|
208
|
+
padding: calc(var(--form-element-spacing-vertical) * 0.5) var(--form-element-spacing-horizontal);
|
|
209
|
+
overflow: hidden;
|
|
210
|
+
border-radius: 0;
|
|
211
|
+
color: var(--dropdown-text);
|
|
212
|
+
text-decoration: none;
|
|
213
|
+
text-overflow: ellipsis;
|
|
214
|
+
|
|
215
|
+
&:hover,
|
|
216
|
+
&:focus,
|
|
217
|
+
&:active,
|
|
218
|
+
&:focus-visible,
|
|
219
|
+
&[aria-current]:not([aria-current=false]) {
|
|
220
|
+
background-color: var(--dropdown-hover-bg);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
& label {
|
|
225
|
+
width: 100%;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
&:has(label):hover {
|
|
229
|
+
background-color: var(--dropdown-hover-bg);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
&[open] > summary {
|
|
234
|
+
margin-bottom: 0;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
&[open] > summary + ul[role="menu"] {
|
|
238
|
+
transform: scaleY(1);
|
|
239
|
+
opacity: 1;
|
|
240
|
+
transition: opacity var(--transition), transform 0s ease-in-out 0s;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
&[open] > summary::before {
|
|
244
|
+
display: block;
|
|
245
|
+
z-index: 1;
|
|
246
|
+
position: fixed;
|
|
247
|
+
width: 100vw;
|
|
248
|
+
height: 100vh;
|
|
249
|
+
inset: 0;
|
|
250
|
+
background: none;
|
|
251
|
+
content: "";
|
|
252
|
+
cursor: default;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
nav details:has(> summary[aria-haspopup="menu"]) {
|
|
257
|
+
margin-bottom: 0;
|
|
258
|
+
display: inline;
|
|
259
|
+
margin: calc(var(--nav-element-spacing-vertical) * -1) 0;
|
|
260
|
+
|
|
261
|
+
& > summary::after {
|
|
262
|
+
transform: rotate(0deg) translateX(0rem);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
& > :where(summary:not([role])) {
|
|
266
|
+
display: flex;
|
|
267
|
+
align-items: center;
|
|
268
|
+
height: calc(1rem * var(--line-height) + var(--nav-link-spacing-vertical) * 2);
|
|
269
|
+
padding: calc(var(--nav-link-spacing-vertical) - var(--border-width) * 2) var(--nav-link-spacing-horizontal);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
& > :where(summary:not([role]):focus-visible) {
|
|
273
|
+
box-shadow: 0 0 0 var(--outline-width) var(--color-primary-focus);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
& summary:focus-visible {
|
|
277
|
+
--outline-width: 0.125rem;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/* Styles for dropdowns with role="button" inside nav */
|
|
281
|
+
& > summary[role="button"] {
|
|
282
|
+
display: flex;
|
|
283
|
+
align-items: center;
|
|
284
|
+
width: auto;
|
|
285
|
+
height: calc(1rem * var(--line-height) + var(--nav-link-spacing-vertical) * 2);
|
|
286
|
+
padding: calc(var(--nav-link-spacing-vertical) - var(--border-width) * 2) var(--nav-link-spacing-horizontal);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
label > details:has(> summary[aria-haspopup="menu"]) {
|
|
291
|
+
margin-top: calc(var(--spacing) * 0.25);
|
|
292
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modal (<dialog>)
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/* Prevent body scroll and interaction when modal is open */
|
|
6
|
+
/* Uses :has() for automatic detection - no classes needed */
|
|
7
|
+
/* Accounts for both [open] attribute (JS) and :target (CSS-only) */
|
|
8
|
+
body:has(dialog[open]),
|
|
9
|
+
body:has(dialog:target) {
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
pointer-events: none;
|
|
12
|
+
touch-action: none;
|
|
13
|
+
|
|
14
|
+
& dialog[open],
|
|
15
|
+
& dialog:target {
|
|
16
|
+
pointer-events: auto;
|
|
17
|
+
touch-action: auto;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
dialog {
|
|
22
|
+
display: flex;
|
|
23
|
+
z-index: 999;
|
|
24
|
+
position: fixed;
|
|
25
|
+
top: 0;
|
|
26
|
+
right: 0;
|
|
27
|
+
bottom: 0;
|
|
28
|
+
left: 0;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
width: inherit;
|
|
32
|
+
min-width: 100%;
|
|
33
|
+
height: inherit;
|
|
34
|
+
min-height: 100%;
|
|
35
|
+
padding: 0;
|
|
36
|
+
border: 0;
|
|
37
|
+
backdrop-filter: var(--modal-overlay-backdrop-filter);
|
|
38
|
+
background-color: var(--modal-overlay-bg);
|
|
39
|
+
color: var(--color-text);
|
|
40
|
+
|
|
41
|
+
/* Modal content box - styled like a card */
|
|
42
|
+
/* Works with: <dialog><article>...</article></dialog> */
|
|
43
|
+
& > article {
|
|
44
|
+
width: 100%;
|
|
45
|
+
max-height: calc(100vh - var(--spacing) * 2);
|
|
46
|
+
margin: var(--spacing);
|
|
47
|
+
padding: var(--block-spacing-vertical) var(--block-spacing-horizontal);
|
|
48
|
+
overflow: auto;
|
|
49
|
+
border-radius: var(--border-radius);
|
|
50
|
+
background: var(--card-bg);
|
|
51
|
+
box-shadow: var(--card-shadow);
|
|
52
|
+
|
|
53
|
+
@media (min-width: 576px) {
|
|
54
|
+
max-width: 510px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@media (min-width: 768px) {
|
|
58
|
+
max-width: 700px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Header styling */
|
|
62
|
+
& > header {
|
|
63
|
+
margin: calc(var(--block-spacing-vertical) * -1) calc(var(--block-spacing-horizontal) * -1) var(--block-spacing-vertical);
|
|
64
|
+
padding: calc(var(--block-spacing-vertical) * 0.66) var(--block-spacing-horizontal);
|
|
65
|
+
background-color: var(--card-section-bg);
|
|
66
|
+
border-bottom: var(--border-width) solid var(--card-border);
|
|
67
|
+
border-top-right-radius: var(--border-radius);
|
|
68
|
+
border-top-left-radius: var(--border-radius);
|
|
69
|
+
|
|
70
|
+
& > * {
|
|
71
|
+
margin-bottom: 0;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Footer styling */
|
|
76
|
+
& > footer {
|
|
77
|
+
margin: var(--block-spacing-vertical) calc(var(--block-spacing-horizontal) * -1) calc(var(--block-spacing-vertical) * -1);
|
|
78
|
+
padding: calc(var(--block-spacing-vertical) * 0.66) var(--block-spacing-horizontal);
|
|
79
|
+
background-color: var(--card-section-bg);
|
|
80
|
+
border-top: var(--border-width) solid var(--card-border);
|
|
81
|
+
border-bottom-right-radius: var(--border-radius);
|
|
82
|
+
border-bottom-left-radius: var(--border-radius);
|
|
83
|
+
text-align: right;
|
|
84
|
+
|
|
85
|
+
& :where(button, [role=button]) {
|
|
86
|
+
margin-bottom: 0;
|
|
87
|
+
|
|
88
|
+
&:not(:first-of-type) {
|
|
89
|
+
margin-left: calc(var(--spacing) * 0.5);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Close button in header */
|
|
95
|
+
& > header :is(a, button)[rel=prev] {
|
|
96
|
+
margin: 0;
|
|
97
|
+
margin-left: var(--spacing);
|
|
98
|
+
padding: 0;
|
|
99
|
+
float: right;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Close button styling */
|
|
103
|
+
& :is(a, button)[rel=prev] {
|
|
104
|
+
display: block;
|
|
105
|
+
width: 1rem;
|
|
106
|
+
height: 1rem;
|
|
107
|
+
margin-top: calc(var(--spacing) * -1);
|
|
108
|
+
margin-bottom: var(--spacing);
|
|
109
|
+
margin-left: auto;
|
|
110
|
+
border: none;
|
|
111
|
+
border-radius: 0;
|
|
112
|
+
background-image: var(--icon-close);
|
|
113
|
+
background-position: center;
|
|
114
|
+
background-size: auto 1rem;
|
|
115
|
+
background-repeat: no-repeat;
|
|
116
|
+
background-color: transparent;
|
|
117
|
+
box-shadow: none;
|
|
118
|
+
opacity: 0.5;
|
|
119
|
+
transition: opacity var(--transition);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
& :is(a, button)[rel=prev]:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
|
|
123
|
+
--color-background: transparent;
|
|
124
|
+
--border-color: transparent;
|
|
125
|
+
box-shadow: none;
|
|
126
|
+
opacity: 1;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Hidden state */
|
|
131
|
+
&:not([open]),
|
|
132
|
+
&[open=false] {
|
|
133
|
+
display: none;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* CSS-only modal triggering using :target pseudo-class */
|
|
137
|
+
/* When dialog is targeted via anchor link (e.g., <a href="#modal-id">) */
|
|
138
|
+
&:target {
|
|
139
|
+
display: flex;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Opening animation using @starting-style (Chrome 117+, Firefox 129+, Safari 17.4+) */
|
|
144
|
+
/* Gracefully degrades to instant appearance in unsupported browsers */
|
|
145
|
+
dialog {
|
|
146
|
+
transition: opacity 0.2s ease-in-out, backdrop-filter 0.2s ease-in-out;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
dialog > article {
|
|
150
|
+
transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@starting-style {
|
|
154
|
+
dialog {
|
|
155
|
+
backdrop-filter: none;
|
|
156
|
+
background-color: transparent;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
dialog > article {
|
|
160
|
+
opacity: 0;
|
|
161
|
+
transform: translateY(-20px);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Document
|
|
3
|
+
* Semantic document-level styles (variables applied)
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
:where(:root),
|
|
7
|
+
:where(:host) {
|
|
8
|
+
background-color: var(--color-background);
|
|
9
|
+
color: var(--color-text);
|
|
10
|
+
font-weight: var(--font-weight);
|
|
11
|
+
font-size: var(--font-size);
|
|
12
|
+
line-height: var(--line-height);
|
|
13
|
+
font-family: var(--font-family);
|
|
14
|
+
text-underline-offset: var(--text-underline-offset);
|
|
15
|
+
text-rendering: optimizeLegibility;
|
|
16
|
+
overflow-wrap: break-word;
|
|
17
|
+
tab-size: 4;
|
|
18
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Embedded content
|
|
3
|
+
*/
|
|
4
|
+
:where(audio, canvas, iframe, img, svg, video) {
|
|
5
|
+
vertical-align: middle;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
audio,
|
|
9
|
+
video {
|
|
10
|
+
display: inline-block;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
audio:not([controls]) {
|
|
14
|
+
display: none;
|
|
15
|
+
height: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:where(iframe) {
|
|
19
|
+
border-style: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
img {
|
|
23
|
+
max-width: 100%;
|
|
24
|
+
height: auto;
|
|
25
|
+
border-style: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where(svg:not([fill])) {
|
|
29
|
+
fill: currentColor;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
svg {
|
|
33
|
+
&:not(:root),
|
|
34
|
+
&:not(:host) {
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
canvas {
|
|
40
|
+
display: inline-block;
|
|
41
|
+
}
|