hydrateless 0.7.0 → 0.9.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 +120 -0
- package/dist/accordion.css +20 -8
- package/dist/alert.css +15 -7
- package/dist/avatar.css +8 -14
- package/dist/badge.css +9 -1
- package/dist/breadcrumb.css +7 -3
- package/dist/button.css +48 -28
- package/dist/card.css +8 -5
- package/dist/checkbox.css +31 -22
- package/dist/combobox.css +43 -15
- package/dist/command-palette.css +123 -0
- package/dist/components.css +1127 -532
- package/dist/disclosure.css +35 -12
- package/dist/drawer.css +76 -48
- package/dist/dropdown.css +82 -22
- package/dist/field.css +5 -4
- package/dist/hydrateless.css +1359 -1282
- package/dist/hydrateless.min.css +1 -1
- package/dist/input.css +20 -17
- package/dist/kbd.css +4 -3
- package/dist/menu.css +107 -28
- package/dist/modal.css +63 -14
- package/dist/pagination.css +20 -11
- package/dist/popover.css +34 -12
- package/dist/progress.css +23 -12
- package/dist/{radio.css → radio-group.css} +23 -16
- package/dist/reset.css +7 -2
- package/dist/{segmented.css → segmented-control.css} +21 -10
- package/dist/select.css +28 -22
- package/dist/separator.css +9 -9
- package/dist/skeleton.css +18 -10
- package/dist/skip-link.css +13 -8
- package/dist/slider.css +28 -25
- package/dist/spinner.css +17 -14
- package/dist/switch.css +55 -18
- package/dist/table.css +52 -15
- package/dist/tabs.css +35 -11
- package/dist/textarea.css +26 -12
- package/dist/theme.css +5 -24
- package/dist/toast.css +40 -36
- package/dist/toc.css +17 -4
- package/dist/tokens.css +208 -179
- package/dist/tooltip.css +45 -15
- package/package.json +4 -4
- package/dist/command.css +0 -102
package/dist/hydrateless.css
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
@layer reset, tokens, theme, components;
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Reset: a minimal, opinion-light baseline (border-box sizing, no default
|
|
5
|
+
* margins, inherited form typography). Lives in the lowest layer so any
|
|
6
|
+
* component or author rule wins without specificity games.
|
|
7
|
+
*/
|
|
8
|
+
|
|
3
9
|
@layer reset {
|
|
4
10
|
*,
|
|
5
11
|
*::before,
|
|
@@ -23,7 +29,7 @@
|
|
|
23
29
|
|
|
24
30
|
html,
|
|
25
31
|
body {
|
|
26
|
-
|
|
32
|
+
block-size: 100%;
|
|
27
33
|
}
|
|
28
34
|
|
|
29
35
|
body {
|
|
@@ -37,7 +43,7 @@
|
|
|
37
43
|
canvas,
|
|
38
44
|
svg {
|
|
39
45
|
display: block;
|
|
40
|
-
max-
|
|
46
|
+
max-inline-size: 100%;
|
|
41
47
|
}
|
|
42
48
|
|
|
43
49
|
input,
|
|
@@ -61,88 +67,90 @@
|
|
|
61
67
|
@layer tokens {
|
|
62
68
|
:root {
|
|
63
69
|
/* Neutral / gray */
|
|
64
|
-
--hl-gray-50: hsl(
|
|
65
|
-
--hl-gray-100: hsl(
|
|
66
|
-
--hl-gray-200: hsl(
|
|
67
|
-
--hl-gray-300: hsl(
|
|
68
|
-
--hl-gray-400: hsl(
|
|
69
|
-
--hl-gray-500: hsl(
|
|
70
|
-
--hl-gray-600: hsl(
|
|
71
|
-
--hl-gray-700: hsl(
|
|
72
|
-
--hl-gray-800: hsl(
|
|
73
|
-
--hl-gray-900: hsl(
|
|
74
|
-
--hl-gray-950: hsl(
|
|
70
|
+
--hl-gray-50: hsl(210deg 40% 98%);
|
|
71
|
+
--hl-gray-100: hsl(210deg 40% 96%);
|
|
72
|
+
--hl-gray-200: hsl(214deg 32% 91%);
|
|
73
|
+
--hl-gray-300: hsl(213deg 27% 84%);
|
|
74
|
+
--hl-gray-400: hsl(215deg 20% 65%);
|
|
75
|
+
--hl-gray-500: hsl(215deg 16% 47%);
|
|
76
|
+
--hl-gray-600: hsl(215deg 19% 35%);
|
|
77
|
+
--hl-gray-700: hsl(215deg 25% 27%);
|
|
78
|
+
--hl-gray-800: hsl(217deg 33% 17%);
|
|
79
|
+
--hl-gray-900: hsl(222deg 47% 11%);
|
|
80
|
+
--hl-gray-950: hsl(229deg 41% 8%);
|
|
75
81
|
|
|
76
82
|
/* Brand / primary (blue) */
|
|
77
|
-
--hl-brand-50: hsl(
|
|
78
|
-
--hl-brand-100: hsl(
|
|
79
|
-
--hl-brand-200: hsl(
|
|
80
|
-
--hl-brand-300: hsl(
|
|
81
|
-
--hl-brand-400: hsl(
|
|
82
|
-
--hl-brand-500: hsl(
|
|
83
|
-
--hl-brand-600: hsl(
|
|
84
|
-
--hl-brand-700: hsl(
|
|
85
|
-
--hl-brand-800: hsl(
|
|
86
|
-
--hl-brand-900: hsl(
|
|
87
|
-
--hl-brand-950: hsl(
|
|
83
|
+
--hl-brand-50: hsl(214deg 100% 97%);
|
|
84
|
+
--hl-brand-100: hsl(214deg 95% 93%);
|
|
85
|
+
--hl-brand-200: hsl(213deg 97% 87%);
|
|
86
|
+
--hl-brand-300: hsl(212deg 96% 78%);
|
|
87
|
+
--hl-brand-400: hsl(213deg 94% 68%);
|
|
88
|
+
--hl-brand-500: hsl(217deg 91% 60%);
|
|
89
|
+
--hl-brand-600: hsl(221deg 83% 53%);
|
|
90
|
+
--hl-brand-700: hsl(224deg 76% 48%);
|
|
91
|
+
--hl-brand-800: hsl(226deg 71% 40%);
|
|
92
|
+
--hl-brand-900: hsl(224deg 64% 33%);
|
|
93
|
+
--hl-brand-950: hsl(226deg 57% 21%);
|
|
88
94
|
|
|
89
95
|
/* Danger (red) */
|
|
90
|
-
--hl-red-50: hsl(
|
|
91
|
-
--hl-red-100: hsl(
|
|
92
|
-
--hl-red-200: hsl(
|
|
93
|
-
--hl-red-300: hsl(
|
|
94
|
-
--hl-red-400: hsl(
|
|
95
|
-
--hl-red-500: hsl(
|
|
96
|
-
--hl-red-600: hsl(
|
|
97
|
-
--hl-red-700: hsl(
|
|
98
|
-
--hl-red-800: hsl(
|
|
99
|
-
--hl-red-900: hsl(
|
|
100
|
-
--hl-red-950: hsl(
|
|
96
|
+
--hl-red-50: hsl(0deg 86% 97%);
|
|
97
|
+
--hl-red-100: hsl(0deg 93% 94%);
|
|
98
|
+
--hl-red-200: hsl(0deg 96% 89%);
|
|
99
|
+
--hl-red-300: hsl(0deg 94% 82%);
|
|
100
|
+
--hl-red-400: hsl(0deg 91% 71%);
|
|
101
|
+
--hl-red-500: hsl(0deg 84% 60%);
|
|
102
|
+
--hl-red-600: hsl(0deg 72% 51%);
|
|
103
|
+
--hl-red-700: hsl(0deg 74% 42%);
|
|
104
|
+
--hl-red-800: hsl(0deg 70% 35%);
|
|
105
|
+
--hl-red-900: hsl(0deg 63% 31%);
|
|
106
|
+
--hl-red-950: hsl(0deg 75% 15%);
|
|
101
107
|
|
|
102
108
|
/* Warning (amber) */
|
|
103
|
-
--hl-amber-50: hsl(
|
|
104
|
-
--hl-amber-100: hsl(
|
|
105
|
-
--hl-amber-200: hsl(
|
|
106
|
-
--hl-amber-300: hsl(
|
|
107
|
-
--hl-amber-400: hsl(
|
|
108
|
-
--hl-amber-500: hsl(
|
|
109
|
-
--hl-amber-600: hsl(
|
|
110
|
-
--hl-amber-700: hsl(
|
|
111
|
-
--hl-amber-800: hsl(
|
|
112
|
-
--hl-amber-900: hsl(
|
|
113
|
-
--hl-amber-950: hsl(
|
|
109
|
+
--hl-amber-50: hsl(48deg 100% 96%);
|
|
110
|
+
--hl-amber-100: hsl(48deg 96% 89%);
|
|
111
|
+
--hl-amber-200: hsl(48deg 97% 77%);
|
|
112
|
+
--hl-amber-300: hsl(46deg 97% 65%);
|
|
113
|
+
--hl-amber-400: hsl(43deg 96% 56%);
|
|
114
|
+
--hl-amber-500: hsl(38deg 92% 50%);
|
|
115
|
+
--hl-amber-600: hsl(32deg 95% 44%);
|
|
116
|
+
--hl-amber-700: hsl(26deg 90% 37%);
|
|
117
|
+
--hl-amber-800: hsl(23deg 83% 31%);
|
|
118
|
+
--hl-amber-900: hsl(22deg 78% 26%);
|
|
119
|
+
--hl-amber-950: hsl(21deg 92% 14%);
|
|
114
120
|
|
|
115
121
|
/* Success (green) */
|
|
116
|
-
--hl-green-50: hsl(
|
|
117
|
-
--hl-green-100: hsl(
|
|
118
|
-
--hl-green-200: hsl(
|
|
119
|
-
--hl-green-300: hsl(
|
|
120
|
-
--hl-green-400: hsl(
|
|
121
|
-
--hl-green-500: hsl(
|
|
122
|
-
--hl-green-600: hsl(
|
|
123
|
-
--hl-green-700: hsl(
|
|
124
|
-
--hl-green-800: hsl(
|
|
125
|
-
--hl-green-900: hsl(
|
|
126
|
-
--hl-green-950: hsl(
|
|
122
|
+
--hl-green-50: hsl(138deg 76% 97%);
|
|
123
|
+
--hl-green-100: hsl(141deg 84% 93%);
|
|
124
|
+
--hl-green-200: hsl(141deg 79% 85%);
|
|
125
|
+
--hl-green-300: hsl(142deg 77% 73%);
|
|
126
|
+
--hl-green-400: hsl(142deg 69% 58%);
|
|
127
|
+
--hl-green-500: hsl(142deg 71% 45%);
|
|
128
|
+
--hl-green-600: hsl(142deg 76% 36%);
|
|
129
|
+
--hl-green-700: hsl(142deg 72% 29%);
|
|
130
|
+
--hl-green-800: hsl(143deg 64% 24%);
|
|
131
|
+
--hl-green-900: hsl(144deg 61% 20%);
|
|
132
|
+
--hl-green-950: hsl(145deg 80% 10%);
|
|
127
133
|
|
|
128
134
|
/* Info (sky) */
|
|
129
|
-
--hl-sky-50: hsl(
|
|
130
|
-
--hl-sky-100: hsl(
|
|
131
|
-
--hl-sky-200: hsl(
|
|
132
|
-
--hl-sky-300: hsl(
|
|
133
|
-
--hl-sky-400: hsl(
|
|
134
|
-
--hl-sky-500: hsl(
|
|
135
|
-
--hl-sky-600: hsl(
|
|
136
|
-
--hl-sky-700: hsl(
|
|
137
|
-
--hl-sky-800: hsl(
|
|
138
|
-
--hl-sky-900: hsl(
|
|
139
|
-
--hl-sky-950: hsl(
|
|
135
|
+
--hl-sky-50: hsl(204deg 100% 97%);
|
|
136
|
+
--hl-sky-100: hsl(204deg 94% 94%);
|
|
137
|
+
--hl-sky-200: hsl(201deg 94% 86%);
|
|
138
|
+
--hl-sky-300: hsl(199deg 95% 74%);
|
|
139
|
+
--hl-sky-400: hsl(198deg 93% 60%);
|
|
140
|
+
--hl-sky-500: hsl(199deg 89% 48%);
|
|
141
|
+
--hl-sky-600: hsl(200deg 98% 39%);
|
|
142
|
+
--hl-sky-700: hsl(201deg 96% 32%);
|
|
143
|
+
--hl-sky-800: hsl(201deg 90% 27%);
|
|
144
|
+
--hl-sky-900: hsl(202deg 80% 24%);
|
|
145
|
+
--hl-sky-950: hsl(202deg 80% 16%);
|
|
140
146
|
}
|
|
141
147
|
}
|
|
142
148
|
|
|
143
149
|
/**
|
|
144
|
-
* Non-color design scales: spacing, radii, typography,
|
|
145
|
-
* motion. These are theme-independent and rarely overridden per component.
|
|
150
|
+
* Non-color design scales: spacing, radii, typography, control sizing, z-index,
|
|
151
|
+
* and motion. These are theme-independent and rarely overridden per component.
|
|
152
|
+
* Elevation (shadows) lives in semantic.css because it changes with the color
|
|
153
|
+
* scheme.
|
|
146
154
|
*/
|
|
147
155
|
|
|
148
156
|
@layer tokens {
|
|
@@ -180,7 +188,7 @@
|
|
|
180
188
|
|
|
181
189
|
/* Typography */
|
|
182
190
|
--hl-font-sans:
|
|
183
|
-
ui-sans-serif,system-ui,
|
|
191
|
+
ui-sans-serif, system-ui, -apple-system, 'Segoe UI', roboto, helvetica, arial, sans-serif,
|
|
184
192
|
'Apple Color Emoji', 'Segoe UI Emoji';
|
|
185
193
|
--hl-font-mono:
|
|
186
194
|
ui-monospace, sfmono-regular, 'SF Mono', menlo, consolas, 'Liberation Mono', monospace;
|
|
@@ -200,21 +208,30 @@
|
|
|
200
208
|
--hl-font-semibold: 600;
|
|
201
209
|
--hl-font-bold: 700;
|
|
202
210
|
|
|
203
|
-
/* Elevation (shadows), tuned for light surfaces */
|
|
204
|
-
--hl-shadow-xs: 0 1px 2px 0 hsla(222, 47%, 11%, 0.05);
|
|
205
|
-
--hl-shadow-sm: 0 1px 3px 0 hsla(222, 47%, 11%, 0.1), 0 1px 2px -1px hsla(222, 47%, 11%, 0.1);
|
|
206
|
-
--hl-shadow-md:
|
|
207
|
-
0 4px 6px -1px hsla(222, 47%, 11%, 0.1), 0 2px 4px -2px hsla(222, 47%, 11%, 0.1);
|
|
208
|
-
--hl-shadow-lg:
|
|
209
|
-
0 10px 15px -3px hsla(222, 47%, 11%, 0.1), 0 4px 6px -4px hsla(222, 47%, 11%, 0.1);
|
|
210
|
-
--hl-shadow-xl:
|
|
211
|
-
0 20px 25px -5px hsla(222, 47%, 11%, 0.1), 0 8px 10px -6px hsla(222, 47%, 11%, 0.1);
|
|
212
|
-
|
|
213
211
|
/* Control sizing */
|
|
212
|
+
|
|
213
|
+
/* Shared block size of a default (md) control: buttons, inputs, selects, pagination items. */
|
|
214
|
+
--hl-control-block-size: 2.5rem;
|
|
214
215
|
--hl-control-height-sm: 2rem;
|
|
215
|
-
--hl-control-height-md:
|
|
216
|
+
--hl-control-height-md: var(--hl-control-block-size);
|
|
216
217
|
--hl-control-height-lg: 3rem;
|
|
217
218
|
|
|
219
|
+
/* Overlay sizing */
|
|
220
|
+
|
|
221
|
+
/* Inline size of side surfaces such as the drawer (capped to the viewport in the component). */
|
|
222
|
+
--hl-overlay-inline-size: 28rem;
|
|
223
|
+
|
|
224
|
+
/* Maximum inline size of a centered modal dialog. */
|
|
225
|
+
--hl-modal-inline-size: 32rem;
|
|
226
|
+
|
|
227
|
+
/* Interaction states */
|
|
228
|
+
|
|
229
|
+
/* Opacity applied to disabled controls, options, and items. */
|
|
230
|
+
--hl-disabled-opacity: 0.5;
|
|
231
|
+
|
|
232
|
+
/* Gap between a control and its focus-visible outline. */
|
|
233
|
+
--hl-focus-offset: 2px;
|
|
234
|
+
|
|
218
235
|
/* Z-index scale */
|
|
219
236
|
--hl-z-base: 0;
|
|
220
237
|
--hl-z-dropdown: 1000;
|
|
@@ -244,242 +261,244 @@
|
|
|
244
261
|
|
|
245
262
|
/**
|
|
246
263
|
* Semantic tokens map the raw palette to roles (surface, text, border, intent
|
|
247
|
-
* colors). Components reference only these, so theming and dark
|
|
248
|
-
* matter of remapping a couple dozen variables, never touching
|
|
264
|
+
* colors, elevation). Components reference only these, so theming and dark
|
|
265
|
+
* mode are a matter of remapping a couple dozen variables, never touching
|
|
266
|
+
* component CSS.
|
|
249
267
|
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
268
|
+
* Every color is a `light-dark()` pair resolved by `color-scheme`. The root
|
|
269
|
+
* follows the system preference; `[data-theme="light"]` and
|
|
270
|
+
* `[data-theme="dark"]` pin a scheme on any subtree. This is the single place
|
|
271
|
+
* `color-scheme` is declared, so `theme.css` and components must not repeat it.
|
|
253
272
|
*/
|
|
254
273
|
|
|
255
274
|
@layer tokens {
|
|
256
275
|
:root {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
--hl-
|
|
276
|
+
color-scheme: light dark;
|
|
277
|
+
|
|
278
|
+
/* Page and surfaces */
|
|
279
|
+
|
|
280
|
+
/* Document background. */
|
|
281
|
+
--hl-bg: light-dark(var(--hl-gray-50), var(--hl-gray-950));
|
|
282
|
+
|
|
283
|
+
/* Default component surface (cards, inputs, dialogs). */
|
|
284
|
+
--hl-surface: light-dark(hsl(0deg 0% 100%), var(--hl-gray-900));
|
|
285
|
+
|
|
286
|
+
/* One step raised or inset surface (hover, secondary buttons, striped rows). */
|
|
287
|
+
--hl-surface-2: light-dark(var(--hl-gray-100), var(--hl-gray-800));
|
|
288
|
+
|
|
289
|
+
/* Two steps raised or inset surface (tracks, skeletons, active states). */
|
|
290
|
+
--hl-surface-3: light-dark(var(--hl-gray-200), var(--hl-gray-700));
|
|
291
|
+
|
|
292
|
+
/* Text */
|
|
293
|
+
|
|
294
|
+
/* Primary text color. */
|
|
295
|
+
--hl-fg: light-dark(var(--hl-gray-900), var(--hl-gray-50));
|
|
296
|
+
|
|
297
|
+
/* Secondary text (descriptions, captions). */
|
|
298
|
+
--hl-fg-muted: light-dark(var(--hl-gray-600), var(--hl-gray-400));
|
|
299
|
+
|
|
300
|
+
/* Tertiary text (placeholders, separators, disabled hints). */
|
|
263
301
|
--hl-fg-subtle: var(--hl-gray-500);
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
302
|
+
|
|
303
|
+
/* Borders and focus */
|
|
304
|
+
|
|
305
|
+
/* Default hairline border. */
|
|
306
|
+
--hl-border: light-dark(var(--hl-gray-200), var(--hl-gray-800));
|
|
307
|
+
|
|
308
|
+
/* Border for form controls and emphasized dividers. */
|
|
309
|
+
--hl-border-strong: light-dark(var(--hl-gray-300), var(--hl-gray-700));
|
|
310
|
+
|
|
311
|
+
/* Focus ring color. */
|
|
312
|
+
--hl-ring: light-dark(var(--hl-brand-500), var(--hl-brand-400));
|
|
313
|
+
|
|
314
|
+
/* Complete outline value for `:focus-visible`. */
|
|
267
315
|
--hl-focus-ring: var(--hl-border-width-2) solid var(--hl-ring);
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
--hl-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
--hl-primary-
|
|
316
|
+
|
|
317
|
+
/* Soft halo used instead of an outline on borderless-focus controls (inputs, sliders). */
|
|
318
|
+
--hl-focus-shadow: 0 0 0 3px color-mix(in oklab, var(--hl-ring) 30%, transparent);
|
|
319
|
+
|
|
320
|
+
/* Intent: primary */
|
|
321
|
+
--hl-primary: light-dark(var(--hl-brand-600), var(--hl-brand-500));
|
|
322
|
+
--hl-primary-hover: light-dark(var(--hl-brand-700), var(--hl-brand-400));
|
|
323
|
+
--hl-primary-active: light-dark(var(--hl-brand-800), var(--hl-brand-300));
|
|
324
|
+
--hl-primary-fg: light-dark(hsl(0deg 0% 100%), var(--hl-gray-950));
|
|
325
|
+
--hl-primary-subtle: light-dark(var(--hl-brand-50), hsl(226deg 57% 21% / 0.5));
|
|
326
|
+
--hl-primary-subtle-fg: light-dark(var(--hl-brand-700), var(--hl-brand-200));
|
|
327
|
+
|
|
328
|
+
/* Intent: danger */
|
|
274
329
|
--hl-danger: var(--hl-red-600);
|
|
275
330
|
--hl-danger-hover: var(--hl-red-700);
|
|
276
|
-
--hl-danger-fg: hsl(
|
|
277
|
-
--hl-danger-subtle: var(--hl-red-50);
|
|
278
|
-
--hl-danger-subtle-fg: var(--hl-red-700);
|
|
331
|
+
--hl-danger-fg: hsl(0deg 0% 100%);
|
|
332
|
+
--hl-danger-subtle: light-dark(var(--hl-red-50), hsl(0deg 63% 31% / 0.35));
|
|
333
|
+
--hl-danger-subtle-fg: light-dark(var(--hl-red-700), var(--hl-red-200));
|
|
334
|
+
|
|
335
|
+
/* Intent: success */
|
|
279
336
|
--hl-success: var(--hl-green-600);
|
|
280
337
|
--hl-success-hover: var(--hl-green-700);
|
|
281
|
-
--hl-success-fg: hsl(
|
|
282
|
-
--hl-success-subtle: var(--hl-green-50);
|
|
283
|
-
--hl-success-subtle-fg: var(--hl-green-700);
|
|
338
|
+
--hl-success-fg: hsl(0deg 0% 100%);
|
|
339
|
+
--hl-success-subtle: light-dark(var(--hl-green-50), hsl(144deg 61% 20% / 0.35));
|
|
340
|
+
--hl-success-subtle-fg: light-dark(var(--hl-green-700), var(--hl-green-200));
|
|
341
|
+
|
|
342
|
+
/* Intent: warning */
|
|
284
343
|
--hl-warning: var(--hl-amber-500);
|
|
285
344
|
--hl-warning-hover: var(--hl-amber-600);
|
|
286
345
|
--hl-warning-fg: var(--hl-gray-950);
|
|
287
|
-
--hl-warning-subtle: var(--hl-amber-50);
|
|
288
|
-
--hl-warning-subtle-fg: var(--hl-amber-800);
|
|
346
|
+
--hl-warning-subtle: light-dark(var(--hl-amber-50), hsl(22deg 78% 26% / 0.35));
|
|
347
|
+
--hl-warning-subtle-fg: light-dark(var(--hl-amber-800), var(--hl-amber-200));
|
|
348
|
+
|
|
349
|
+
/* Intent: info */
|
|
289
350
|
--hl-info: var(--hl-sky-600);
|
|
290
351
|
--hl-info-hover: var(--hl-sky-700);
|
|
291
|
-
--hl-info-fg: hsl(
|
|
292
|
-
--hl-info-subtle: var(--hl-sky-50);
|
|
293
|
-
--hl-info-subtle-fg: var(--hl-sky-700);
|
|
294
|
-
|
|
352
|
+
--hl-info-fg: hsl(0deg 0% 100%);
|
|
353
|
+
--hl-info-subtle: light-dark(var(--hl-sky-50), hsl(202deg 80% 24% / 0.35));
|
|
354
|
+
--hl-info-subtle-fg: light-dark(var(--hl-sky-700), var(--hl-sky-200));
|
|
355
|
+
|
|
356
|
+
/* Overlays */
|
|
357
|
+
|
|
358
|
+
/* Backdrop behind modal dialogs and drawers. */
|
|
359
|
+
--hl-scrim: light-dark(hsl(222deg 47% 11% / 0.5), hsl(0deg 0% 0% / 0.65));
|
|
360
|
+
|
|
361
|
+
/* Surface of floating layers (menus, popovers, listboxes). */
|
|
295
362
|
--hl-overlay: var(--hl-surface);
|
|
363
|
+
|
|
364
|
+
/* Shadow of floating layers. */
|
|
296
365
|
--hl-overlay-shadow: var(--hl-shadow-lg);
|
|
366
|
+
|
|
367
|
+
/* Elevation. `light-dark()` only takes colors, so the scheme-dependent part
|
|
368
|
+
is the shadow color; dark surfaces need denser shadows to read as raised. */
|
|
369
|
+
|
|
370
|
+
/* Shadow color for the faintest elevation step. */
|
|
371
|
+
--hl-shadow-color-faint: light-dark(hsl(222deg 47% 11% / 0.05), hsl(0deg 0% 0% / 0.3));
|
|
372
|
+
|
|
373
|
+
/* Shadow color for every other elevation step. */
|
|
374
|
+
--hl-shadow-color: light-dark(hsl(222deg 47% 11% / 0.1), hsl(0deg 0% 0% / 0.45));
|
|
375
|
+
--hl-shadow-xs: 0 1px 2px 0 var(--hl-shadow-color-faint);
|
|
376
|
+
--hl-shadow-sm: 0 1px 3px 0 var(--hl-shadow-color), 0 1px 2px -1px var(--hl-shadow-color);
|
|
377
|
+
--hl-shadow-md: 0 4px 6px -1px var(--hl-shadow-color), 0 2px 4px -2px var(--hl-shadow-color);
|
|
378
|
+
--hl-shadow-lg: 0 10px 15px -3px var(--hl-shadow-color), 0 4px 6px -4px var(--hl-shadow-color);
|
|
379
|
+
--hl-shadow-xl: 0 20px 25px -5px var(--hl-shadow-color), 0 8px 10px -6px var(--hl-shadow-color);
|
|
297
380
|
}
|
|
298
381
|
|
|
299
|
-
/*
|
|
300
|
-
|
|
301
|
-
:
|
|
302
|
-
--hl-bg: var(--hl-gray-950);
|
|
303
|
-
--hl-surface: var(--hl-gray-900);
|
|
304
|
-
--hl-surface-2: var(--hl-gray-800);
|
|
305
|
-
--hl-surface-3: var(--hl-gray-700);
|
|
306
|
-
--hl-fg: var(--hl-gray-50);
|
|
307
|
-
--hl-fg-muted: var(--hl-gray-400);
|
|
308
|
-
--hl-fg-subtle: var(--hl-gray-500);
|
|
309
|
-
--hl-border: var(--hl-gray-800);
|
|
310
|
-
--hl-border-strong: var(--hl-gray-700);
|
|
311
|
-
--hl-ring: var(--hl-brand-400);
|
|
312
|
-
--hl-primary: var(--hl-brand-500);
|
|
313
|
-
--hl-primary-hover: var(--hl-brand-400);
|
|
314
|
-
--hl-primary-active: var(--hl-brand-300);
|
|
315
|
-
--hl-primary-fg: var(--hl-gray-950);
|
|
316
|
-
--hl-primary-subtle: hsla(226, 57%, 21%, 0.5);
|
|
317
|
-
--hl-primary-subtle-fg: var(--hl-brand-200);
|
|
318
|
-
--hl-danger-subtle: hsla(0, 63%, 31%, 0.35);
|
|
319
|
-
--hl-danger-subtle-fg: var(--hl-red-200);
|
|
320
|
-
--hl-success-subtle: hsla(144, 61%, 20%, 0.35);
|
|
321
|
-
--hl-success-subtle-fg: var(--hl-green-200);
|
|
322
|
-
--hl-warning-subtle: hsla(22, 78%, 26%, 0.35);
|
|
323
|
-
--hl-warning-subtle-fg: var(--hl-amber-200);
|
|
324
|
-
--hl-info-subtle: hsla(202, 80%, 24%, 0.35);
|
|
325
|
-
--hl-info-subtle-fg: var(--hl-sky-200);
|
|
326
|
-
--hl-scrim: hsla(0, 0%, 0%, 0.65);
|
|
327
|
-
--hl-shadow-xs: 0 1px 2px 0 hsla(0, 0%, 0%, 0.3);
|
|
328
|
-
--hl-shadow-sm: 0 1px 3px 0 hsla(0, 0%, 0%, 0.4), 0 1px 2px -1px hsla(0, 0%, 0%, 0.4);
|
|
329
|
-
--hl-shadow-md: 0 4px 6px -1px hsla(0, 0%, 0%, 0.45), 0 2px 4px -2px hsla(0, 0%, 0%, 0.45);
|
|
330
|
-
--hl-shadow-lg: 0 10px 15px -3px hsla(0, 0%, 0%, 0.5), 0 4px 6px -4px hsla(0, 0%, 0%, 0.5);
|
|
331
|
-
--hl-shadow-xl:
|
|
332
|
-
0 20px 25px -5px hsla(0, 0%, 0%, 0.55), 0 8px 10px -6px hsla(0, 0%, 0%, 0.55);
|
|
333
|
-
}
|
|
382
|
+
/* Pin a scheme for a subtree; `light-dark()` picks the matching side. */
|
|
383
|
+
[data-theme='light'] {
|
|
384
|
+
color-scheme: light;
|
|
334
385
|
}
|
|
335
386
|
|
|
336
387
|
[data-theme='dark'] {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
--hl-fg-subtle: var(--hl-gray-500);
|
|
344
|
-
--hl-border: var(--hl-gray-800);
|
|
345
|
-
--hl-border-strong: var(--hl-gray-700);
|
|
346
|
-
--hl-ring: var(--hl-brand-400);
|
|
347
|
-
--hl-primary: var(--hl-brand-500);
|
|
348
|
-
--hl-primary-hover: var(--hl-brand-400);
|
|
349
|
-
--hl-primary-active: var(--hl-brand-300);
|
|
350
|
-
--hl-primary-fg: var(--hl-gray-950);
|
|
351
|
-
--hl-primary-subtle: hsla(226, 57%, 21%, 0.5);
|
|
352
|
-
--hl-primary-subtle-fg: var(--hl-brand-200);
|
|
353
|
-
--hl-danger-subtle: hsla(0, 63%, 31%, 0.35);
|
|
354
|
-
--hl-danger-subtle-fg: var(--hl-red-200);
|
|
355
|
-
--hl-success-subtle: hsla(144, 61%, 20%, 0.35);
|
|
356
|
-
--hl-success-subtle-fg: var(--hl-green-200);
|
|
357
|
-
--hl-warning-subtle: hsla(22, 78%, 26%, 0.35);
|
|
358
|
-
--hl-warning-subtle-fg: var(--hl-amber-200);
|
|
359
|
-
--hl-info-subtle: hsla(202, 80%, 24%, 0.35);
|
|
360
|
-
--hl-info-subtle-fg: var(--hl-sky-200);
|
|
361
|
-
--hl-scrim: hsla(0, 0%, 0%, 0.65);
|
|
362
|
-
--hl-shadow-xs: 0 1px 2px 0 hsla(0, 0%, 0%, 0.3);
|
|
363
|
-
--hl-shadow-sm: 0 1px 3px 0 hsla(0, 0%, 0%, 0.4), 0 1px 2px -1px hsla(0, 0%, 0%, 0.4);
|
|
364
|
-
--hl-shadow-md: 0 4px 6px -1px hsla(0, 0%, 0%, 0.45), 0 2px 4px -2px hsla(0, 0%, 0%, 0.45);
|
|
365
|
-
--hl-shadow-lg: 0 10px 15px -3px hsla(0, 0%, 0%, 0.5), 0 4px 6px -4px hsla(0, 0%, 0%, 0.5);
|
|
366
|
-
--hl-shadow-xl: 0 20px 25px -5px hsla(0, 0%, 0%, 0.55), 0 8px 10px -6px hsla(0, 0%, 0%, 0.55);
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
/* Windows High Contrast / forced-colors: defer to system colors. */
|
|
388
|
+
color-scheme: dark;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/* Windows High Contrast / forced-colors: defer to system colors so every
|
|
392
|
+
role stays legible against the user's palette. Components add borders
|
|
393
|
+
where they normally rely on fills alone. */
|
|
370
394
|
@media (forced-colors: active) {
|
|
371
395
|
:root {
|
|
396
|
+
--hl-bg: Canvas;
|
|
397
|
+
--hl-surface: Canvas;
|
|
398
|
+
--hl-surface-2: Canvas;
|
|
399
|
+
--hl-surface-3: Canvas;
|
|
400
|
+
--hl-fg: CanvasText;
|
|
401
|
+
--hl-fg-muted: CanvasText;
|
|
402
|
+
--hl-fg-subtle: GrayText;
|
|
372
403
|
--hl-border: CanvasText;
|
|
373
404
|
--hl-border-strong: CanvasText;
|
|
374
405
|
--hl-ring: Highlight;
|
|
406
|
+
--hl-focus-shadow: 0 0 0 3px Highlight;
|
|
375
407
|
--hl-primary: Highlight;
|
|
376
|
-
--hl-primary-fg:
|
|
408
|
+
--hl-primary-fg: HighlightText;
|
|
409
|
+
--hl-primary-subtle: Highlight;
|
|
410
|
+
--hl-primary-subtle-fg: HighlightText;
|
|
411
|
+
--hl-scrim: Canvas;
|
|
377
412
|
}
|
|
378
413
|
}
|
|
379
414
|
}
|
|
380
415
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
@media (prefers-color-scheme: dark){
|
|
387
|
-
:root {
|
|
388
|
-
--csstools-color-scheme--light: ;
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
[data-theme='light'] {
|
|
393
|
-
--csstools-color-scheme--light: initial;
|
|
394
|
-
color-scheme: light;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
[data-theme='dark'] {
|
|
398
|
-
--csstools-color-scheme--light: ;
|
|
399
|
-
color-scheme: dark;
|
|
400
|
-
}
|
|
416
|
+
/**
|
|
417
|
+
* Theme: document-level defaults built on the semantic tokens. `color-scheme`
|
|
418
|
+
* and the `[data-theme]` switches live in tokens/semantic.css so this file
|
|
419
|
+
* only has to apply the resolved colors and type to the page.
|
|
420
|
+
*/
|
|
401
421
|
|
|
422
|
+
@layer theme {
|
|
402
423
|
body {
|
|
403
|
-
background-color: hsl(210, 40%, 98%);
|
|
404
424
|
background-color: var(--hl-bg);
|
|
405
|
-
color: hsl(222, 47%, 11%);
|
|
406
425
|
color: var(--hl-fg);
|
|
407
|
-
font-family: ui-sans-serif,system-ui,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans, -apple-system, 'Segoe UI', roboto, helvetica, arial, sans-serif,
|
|
408
|
-
'Apple Color Emoji', 'Segoe UI Emoji';
|
|
409
426
|
font-family: var(--hl-font-sans);
|
|
410
|
-
font-size: 1rem;
|
|
411
427
|
font-size: var(--hl-text-base);
|
|
412
|
-
line-height: 1.5;
|
|
413
428
|
line-height: var(--hl-leading-normal);
|
|
414
429
|
-webkit-font-smoothing: antialiased;
|
|
415
430
|
}
|
|
416
431
|
|
|
417
|
-
::-moz-selection {
|
|
418
|
-
background-color: rgba(36, 99, 235, 0.3);
|
|
419
|
-
}
|
|
420
|
-
|
|
421
432
|
::selection {
|
|
422
|
-
background-color: rgba(36, 99, 235, 0.3);
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
@supports (color: color-mix(in lch, red, blue)){
|
|
426
|
-
::-moz-selection {
|
|
427
|
-
background-color: color-mix(in oklab, var(--hl-primary) 30%, transparent);
|
|
428
|
-
}
|
|
429
|
-
::selection {
|
|
430
433
|
background-color: color-mix(in oklab, var(--hl-primary) 30%, transparent);
|
|
431
434
|
}
|
|
432
435
|
}
|
|
433
|
-
}
|
|
434
436
|
|
|
435
437
|
/* Disclosure & layout */
|
|
436
438
|
|
|
439
|
+
/**
|
|
440
|
+
* Disclosure: a styled native `<details>`. The class and the `data-hl-disclosure`
|
|
441
|
+
* attribute (which also opts into the state enhancer) are interchangeable, so
|
|
442
|
+
* plain HTML needs only one of them.
|
|
443
|
+
*
|
|
444
|
+
* No-JS baseline: fully functional; exclusive groups need only a shared `name`
|
|
445
|
+
* attribute. The enhancer mirrors open state into its API and reads no other
|
|
446
|
+
* attributes.
|
|
447
|
+
*/
|
|
448
|
+
|
|
437
449
|
@layer components {
|
|
438
|
-
details.hl-disclosure {
|
|
439
|
-
border:
|
|
440
|
-
border: 1px solid var(--hl-border);
|
|
441
|
-
border-radius: 0.5rem;
|
|
450
|
+
details:is(.hl-disclosure, [data-hl-disclosure]) {
|
|
451
|
+
border: var(--hl-border-width) solid var(--hl-border);
|
|
442
452
|
border-radius: var(--hl-radius-lg);
|
|
443
|
-
background: hsl(0, 0%, 100%);
|
|
444
453
|
background: var(--hl-surface);
|
|
445
454
|
}
|
|
446
455
|
|
|
447
|
-
details.hl-disclosure > summary {
|
|
456
|
+
details:is(.hl-disclosure, [data-hl-disclosure]) > summary {
|
|
457
|
+
display: flex;
|
|
458
|
+
align-items: center;
|
|
459
|
+
gap: var(--hl-space-2);
|
|
448
460
|
list-style: none;
|
|
449
461
|
cursor: pointer;
|
|
450
|
-
padding: 0.75rem 1rem;
|
|
451
462
|
padding: var(--hl-space-3) var(--hl-space-4);
|
|
452
463
|
}
|
|
453
464
|
|
|
454
|
-
details.hl-disclosure > summary::-webkit-details-marker {
|
|
465
|
+
details:is(.hl-disclosure, [data-hl-disclosure]) > summary::-webkit-details-marker {
|
|
455
466
|
display: none;
|
|
456
467
|
}
|
|
457
468
|
|
|
458
|
-
details.hl-disclosure > summary:focus-visible {
|
|
459
|
-
outline: 2px solid hsl(217, 91%, 60%);
|
|
469
|
+
details:is(.hl-disclosure, [data-hl-disclosure]) > summary:focus-visible {
|
|
460
470
|
outline: var(--hl-focus-ring);
|
|
461
|
-
outline-offset:
|
|
471
|
+
outline-offset: var(--hl-focus-offset);
|
|
462
472
|
}
|
|
463
473
|
|
|
464
|
-
|
|
474
|
+
/* The marker sits at the inline end so it lands on the left under RTL. */
|
|
475
|
+
details:is(.hl-disclosure, [data-hl-disclosure]) > summary::after {
|
|
465
476
|
content: '\25B8';
|
|
466
|
-
|
|
467
|
-
transition:
|
|
468
|
-
transition: transform var(--hl-duration-fast) var(--hl-ease-standard);
|
|
477
|
+
margin-inline-start: auto;
|
|
478
|
+
transition: rotate var(--hl-duration-fast) var(--hl-ease-standard);
|
|
469
479
|
}
|
|
470
480
|
|
|
471
|
-
details.hl-disclosure[open] > summary::after {
|
|
472
|
-
|
|
481
|
+
details:is(.hl-disclosure, [data-hl-disclosure])[open] > summary::after {
|
|
482
|
+
rotate: 90deg;
|
|
473
483
|
}
|
|
474
484
|
|
|
475
|
-
|
|
476
|
-
|
|
485
|
+
/* Mirror the marker under RTL so it points into the reading direction, and
|
|
486
|
+
rotate the other way so the open state still points down. */
|
|
487
|
+
details:is(.hl-disclosure, [data-hl-disclosure]):dir(rtl) > summary::after {
|
|
488
|
+
scale: -1 1;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
details:is(.hl-disclosure, [data-hl-disclosure])[open]:dir(rtl) > summary::after {
|
|
492
|
+
rotate: -90deg;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
details:is(.hl-disclosure, [data-hl-disclosure]) > .hl-disclosure-panel {
|
|
477
496
|
padding: var(--hl-space-3) var(--hl-space-4) var(--hl-space-4);
|
|
478
497
|
}
|
|
479
498
|
}
|
|
480
499
|
|
|
481
500
|
/**
|
|
482
|
-
* Tabs
|
|
501
|
+
* Tabs: `<div data-hl-tabs>`. Two markups are supported and styled together:
|
|
483
502
|
*
|
|
484
503
|
* - CSS-only baseline: `.hl-tablist` of `<label class="hl-tab">` wrapping a
|
|
485
504
|
* radio, then a `.hl-tabpanels` of `.hl-tabpanel`s. `:has(input:checked)`
|
|
@@ -487,40 +506,45 @@
|
|
|
487
506
|
* - Enhanced: the enhancer adds `role="tab"`/`tabpanel`, roving focus, and
|
|
488
507
|
* `aria-selected`, toggles `[hidden]` on panels, and marks the root
|
|
489
508
|
* `data-hl-ready`, at which point the no-JS rules below stand down.
|
|
509
|
+
* data-hl-tabs: root
|
|
510
|
+
* data-hl-ready: set by the enhancer
|
|
511
|
+
* `aria-orientation="vertical"` on the tablist stacks the tabs at the
|
|
512
|
+
* inline start of the panels.
|
|
490
513
|
*/
|
|
491
514
|
|
|
492
515
|
@layer components {
|
|
493
516
|
[data-hl-tabs] {
|
|
494
|
-
border: 1px solid hsl(214, 32%, 91%);
|
|
495
517
|
border: var(--hl-border-width) solid var(--hl-border);
|
|
496
|
-
border-radius: 0.5rem;
|
|
497
518
|
border-radius: var(--hl-radius-lg);
|
|
498
519
|
}
|
|
499
520
|
|
|
500
521
|
.hl-tablist,
|
|
501
522
|
[data-hl-tabs] [role='tablist'] {
|
|
502
523
|
display: flex;
|
|
503
|
-
gap: 0.5rem;
|
|
504
524
|
gap: var(--hl-space-2);
|
|
505
|
-
padding: 0.5rem;
|
|
506
525
|
padding: var(--hl-space-2);
|
|
507
|
-
border-
|
|
508
|
-
|
|
526
|
+
border-block-end: var(--hl-border-width) solid var(--hl-border);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
[data-hl-tabs]:has(> [role='tablist'][aria-orientation='vertical']) {
|
|
530
|
+
display: flex;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
[data-hl-tabs] [role='tablist'][aria-orientation='vertical'] {
|
|
534
|
+
flex-direction: column;
|
|
535
|
+
border-block-end: 0;
|
|
536
|
+
border-inline-end: var(--hl-border-width) solid var(--hl-border);
|
|
509
537
|
}
|
|
510
538
|
|
|
511
539
|
.hl-tab,
|
|
512
540
|
[data-hl-tabs] [role='tab'] {
|
|
513
541
|
position: relative;
|
|
514
|
-
|
|
515
|
-
-moz-appearance: none;
|
|
516
|
-
appearance: none;
|
|
542
|
+
appearance: none;
|
|
517
543
|
display: inline-flex;
|
|
518
544
|
align-items: center;
|
|
519
545
|
background: transparent;
|
|
520
546
|
border: 0;
|
|
521
|
-
border-radius: 0.25rem;
|
|
522
547
|
border-radius: var(--hl-radius-sm);
|
|
523
|
-
padding: 0.5rem 0.75rem;
|
|
524
548
|
padding: var(--hl-space-2) var(--hl-space-3);
|
|
525
549
|
color: inherit;
|
|
526
550
|
font: inherit;
|
|
@@ -530,10 +554,7 @@
|
|
|
530
554
|
/* The baseline keeps selection in a visually hidden radio per tab label. */
|
|
531
555
|
.hl-tab > input[type='radio'] {
|
|
532
556
|
position: absolute;
|
|
533
|
-
|
|
534
|
-
right: 0;
|
|
535
|
-
bottom: 0;
|
|
536
|
-
left: 0;
|
|
557
|
+
inset: 0;
|
|
537
558
|
margin: 0;
|
|
538
559
|
opacity: 0;
|
|
539
560
|
cursor: pointer;
|
|
@@ -541,27 +562,24 @@
|
|
|
541
562
|
|
|
542
563
|
.hl-tab:has(input:checked),
|
|
543
564
|
[data-hl-tabs] [role='tab'][aria-selected='true'] {
|
|
544
|
-
background: hsl(210, 40%, 96%);
|
|
545
565
|
background: var(--hl-surface-2);
|
|
546
566
|
}
|
|
547
567
|
|
|
548
568
|
.hl-tab:has(input:focus-visible),
|
|
549
569
|
[data-hl-tabs] [role='tab']:focus-visible {
|
|
550
|
-
outline: 2px solid hsl(217, 91%, 60%);
|
|
551
570
|
outline: var(--hl-focus-ring);
|
|
552
|
-
outline-offset:
|
|
571
|
+
outline-offset: var(--hl-focus-offset);
|
|
553
572
|
}
|
|
554
573
|
|
|
555
574
|
.hl-tab:has(input:disabled),
|
|
556
575
|
[data-hl-tabs] [role='tab'][disabled],
|
|
557
576
|
[data-hl-tabs] [role='tab'][aria-disabled='true'] {
|
|
558
|
-
opacity:
|
|
577
|
+
opacity: var(--hl-disabled-opacity);
|
|
559
578
|
cursor: not-allowed;
|
|
560
579
|
}
|
|
561
580
|
|
|
562
581
|
.hl-tabpanel,
|
|
563
582
|
[data-hl-tabs] [role='tabpanel'] {
|
|
564
|
-
padding: 1rem;
|
|
565
583
|
padding: var(--hl-space-4);
|
|
566
584
|
}
|
|
567
585
|
|
|
@@ -615,29 +633,53 @@
|
|
|
615
633
|
[data-hl-tabs]:not([data-hl-ready]) [role='tabpanel'] ~ [role='tabpanel'] {
|
|
616
634
|
display: none;
|
|
617
635
|
}
|
|
636
|
+
|
|
637
|
+
/* Selection is a fill, which forced colors flatten; use the system highlight
|
|
638
|
+
and give every tab an edge. */
|
|
639
|
+
@media (forced-colors: active) {
|
|
640
|
+
.hl-tab,
|
|
641
|
+
[data-hl-tabs] [role='tab'] {
|
|
642
|
+
border: var(--hl-border-width) solid ButtonBorder;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
.hl-tab:has(input:checked),
|
|
646
|
+
[data-hl-tabs] [role='tab'][aria-selected='true'] {
|
|
647
|
+
background: Highlight;
|
|
648
|
+
color: HighlightText;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
618
651
|
}
|
|
619
652
|
|
|
653
|
+
/**
|
|
654
|
+
* Accordion: `<div data-hl-accordion>` of native `<details>` items, each with a
|
|
655
|
+
* `<summary>` header and an `.hl-accordion-panel` body.
|
|
656
|
+
*
|
|
657
|
+
* No-JS baseline: `<details>` opens and closes on its own; exclusive groups
|
|
658
|
+
* need only a shared `name` attribute. The enhancer adds arrow-key movement
|
|
659
|
+
* between headers and the value API, and reads nothing else from the markup.
|
|
660
|
+
* data-hl-accordion: root (opts into the enhancer)
|
|
661
|
+
*/
|
|
662
|
+
|
|
620
663
|
@layer components {
|
|
621
664
|
[data-hl-accordion] {
|
|
622
|
-
border:
|
|
623
|
-
border: 1px solid var(--hl-border);
|
|
624
|
-
border-radius: 0.5rem;
|
|
665
|
+
border: var(--hl-border-width) solid var(--hl-border);
|
|
625
666
|
border-radius: var(--hl-radius-lg);
|
|
626
667
|
}
|
|
627
668
|
|
|
628
669
|
[data-hl-accordion] > details {
|
|
629
|
-
border-
|
|
630
|
-
border-top: 1px solid var(--hl-border);
|
|
670
|
+
border-block-start: var(--hl-border-width) solid var(--hl-border);
|
|
631
671
|
}
|
|
632
672
|
|
|
633
673
|
[data-hl-accordion] > details:first-child {
|
|
634
|
-
border-
|
|
674
|
+
border-block-start: 0;
|
|
635
675
|
}
|
|
636
676
|
|
|
637
677
|
[data-hl-accordion] > details > summary {
|
|
678
|
+
display: flex;
|
|
679
|
+
align-items: center;
|
|
680
|
+
gap: var(--hl-space-2);
|
|
638
681
|
list-style: none;
|
|
639
682
|
cursor: pointer;
|
|
640
|
-
padding: 0.75rem 1rem;
|
|
641
683
|
padding: var(--hl-space-3) var(--hl-space-4);
|
|
642
684
|
}
|
|
643
685
|
|
|
@@ -646,36 +688,38 @@
|
|
|
646
688
|
}
|
|
647
689
|
|
|
648
690
|
[data-hl-accordion] > details > summary:focus-visible {
|
|
649
|
-
outline: 2px solid hsl(217, 91%, 60%);
|
|
650
691
|
outline: var(--hl-focus-ring);
|
|
651
|
-
outline-offset:
|
|
692
|
+
outline-offset: var(--hl-focus-offset);
|
|
652
693
|
}
|
|
653
694
|
|
|
695
|
+
/* The chevron sits at the inline end so it lands on the left under RTL. */
|
|
654
696
|
[data-hl-accordion] > details > summary::after {
|
|
655
697
|
content: '\25BE';
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
transition: transform 120ms cubic-bezier(0.2, 0, 0, 1);
|
|
659
|
-
transition: transform var(--hl-duration-fast) var(--hl-ease-standard);
|
|
698
|
+
margin-inline-start: auto;
|
|
699
|
+
transition: rotate var(--hl-duration-fast) var(--hl-ease-standard);
|
|
660
700
|
}
|
|
661
701
|
|
|
662
702
|
[data-hl-accordion] > details[open] > summary::after {
|
|
663
|
-
|
|
703
|
+
rotate: 180deg;
|
|
664
704
|
}
|
|
665
705
|
|
|
666
706
|
[data-hl-accordion] > details > .hl-accordion-panel {
|
|
667
|
-
padding: 0.75rem 1rem 1rem;
|
|
668
707
|
padding: var(--hl-space-3) var(--hl-space-4) var(--hl-space-4);
|
|
669
708
|
}
|
|
670
709
|
}
|
|
671
710
|
|
|
711
|
+
/**
|
|
712
|
+
* Table of contents: `<nav data-hl-toc>` with nested `<ul>` lists of anchor
|
|
713
|
+
* links. With no JavaScript it is a plain link list; the enhancer marks the
|
|
714
|
+
* link for the heading in view with `aria-current="true"`.
|
|
715
|
+
* data-hl-toc: the nav
|
|
716
|
+
* data-hl-toc-content: optional element whose headings are observed
|
|
717
|
+
*/
|
|
718
|
+
|
|
672
719
|
@layer components {
|
|
673
720
|
nav[data-hl-toc] {
|
|
674
|
-
border:
|
|
675
|
-
border: 1px solid var(--hl-border);
|
|
676
|
-
border-radius: 0.5rem;
|
|
721
|
+
border: var(--hl-border-width) solid var(--hl-border);
|
|
677
722
|
border-radius: var(--hl-radius-lg);
|
|
678
|
-
padding: 0.75rem;
|
|
679
723
|
padding: var(--hl-space-3);
|
|
680
724
|
}
|
|
681
725
|
|
|
@@ -692,32 +736,40 @@
|
|
|
692
736
|
|
|
693
737
|
nav[data-hl-toc] a {
|
|
694
738
|
display: block;
|
|
695
|
-
padding: 0.25rem 0.5rem;
|
|
696
739
|
padding: var(--hl-space-1) var(--hl-space-2);
|
|
697
|
-
border-radius: 0.25rem;
|
|
698
740
|
border-radius: var(--hl-radius-sm);
|
|
699
741
|
color: inherit;
|
|
700
|
-
-webkit-text-decoration: none;
|
|
701
742
|
text-decoration: none;
|
|
702
743
|
}
|
|
703
744
|
|
|
704
745
|
nav[data-hl-toc] a:focus-visible {
|
|
705
|
-
outline: 2px solid hsl(217, 91%, 60%);
|
|
706
746
|
outline: var(--hl-focus-ring);
|
|
707
|
-
outline-offset: -
|
|
747
|
+
outline-offset: calc(var(--hl-focus-offset) * -1);
|
|
708
748
|
}
|
|
709
749
|
|
|
710
750
|
nav[data-hl-toc] a[aria-current='true'] {
|
|
711
|
-
background: hsl(210, 40%, 96%);
|
|
712
751
|
background: var(--hl-surface-2);
|
|
713
752
|
}
|
|
714
753
|
|
|
715
754
|
nav[data-hl-toc] ul ul {
|
|
716
|
-
padding-
|
|
717
|
-
|
|
755
|
+
padding-inline-start: var(--hl-space-3);
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
@media (forced-colors: active) {
|
|
759
|
+
nav[data-hl-toc] a[aria-current='true'] {
|
|
760
|
+
background: Highlight;
|
|
761
|
+
color: HighlightText;
|
|
762
|
+
}
|
|
718
763
|
}
|
|
719
764
|
}
|
|
720
765
|
|
|
766
|
+
/**
|
|
767
|
+
* Breadcrumb: `<nav data-hl-breadcrumb aria-label="Breadcrumb">` wrapping an
|
|
768
|
+
* `<ol>` of links; the current page carries `aria-current="page"`. Pure CSS;
|
|
769
|
+
* there is no enhancer. Order follows the writing direction, so the trail
|
|
770
|
+
* reads right to left under RTL.
|
|
771
|
+
*/
|
|
772
|
+
|
|
721
773
|
@layer components {
|
|
722
774
|
nav[data-hl-breadcrumb] ol {
|
|
723
775
|
display: flex;
|
|
@@ -726,45 +778,36 @@
|
|
|
726
778
|
list-style: none;
|
|
727
779
|
margin: 0;
|
|
728
780
|
padding: 0;
|
|
729
|
-
gap: 0.25rem;
|
|
730
781
|
gap: var(--hl-space-1);
|
|
731
782
|
}
|
|
732
783
|
|
|
733
784
|
nav[data-hl-breadcrumb] li {
|
|
734
785
|
display: flex;
|
|
735
786
|
align-items: center;
|
|
736
|
-
gap: 0.25rem;
|
|
737
787
|
gap: var(--hl-space-1);
|
|
738
788
|
}
|
|
739
789
|
|
|
740
790
|
nav[data-hl-breadcrumb] li + li::before {
|
|
741
791
|
content: '/';
|
|
742
|
-
color: hsl(215, 16%, 47%);
|
|
743
792
|
color: var(--hl-fg-subtle);
|
|
744
793
|
}
|
|
745
794
|
|
|
746
795
|
nav[data-hl-breadcrumb] a {
|
|
747
|
-
color: hsl(221, 83%, 53%);
|
|
748
796
|
color: var(--hl-primary);
|
|
749
|
-
-webkit-text-decoration: none;
|
|
750
797
|
text-decoration: none;
|
|
751
|
-
border-radius: 0.25rem;
|
|
752
798
|
border-radius: var(--hl-radius-sm);
|
|
753
799
|
}
|
|
754
800
|
|
|
755
801
|
nav[data-hl-breadcrumb] a:hover {
|
|
756
|
-
-webkit-text-decoration: underline;
|
|
757
802
|
text-decoration: underline;
|
|
758
803
|
}
|
|
759
804
|
|
|
760
805
|
nav[data-hl-breadcrumb] a:focus-visible {
|
|
761
|
-
outline: 2px solid hsl(217, 91%, 60%);
|
|
762
806
|
outline: var(--hl-focus-ring);
|
|
763
|
-
outline-offset:
|
|
807
|
+
outline-offset: var(--hl-focus-offset);
|
|
764
808
|
}
|
|
765
809
|
|
|
766
810
|
nav[data-hl-breadcrumb] [aria-current='page'] {
|
|
767
|
-
color: hsl(222, 47%, 11%);
|
|
768
811
|
color: var(--hl-fg);
|
|
769
812
|
}
|
|
770
813
|
}
|
|
@@ -772,7 +815,8 @@
|
|
|
772
815
|
/**
|
|
773
816
|
* Pagination: `<nav class="hl-pagination" aria-label="Pagination">` wrapping a
|
|
774
817
|
* list of `.hl-pagination-item` links/buttons; mark the active page with
|
|
775
|
-
* `aria-current="page"` and use `.hl-pagination-ellipsis` for gaps.
|
|
818
|
+
* `aria-current="page"` and use `.hl-pagination-ellipsis` for gaps. Pure CSS;
|
|
819
|
+
* there is no enhancer. Item order follows the writing direction.
|
|
776
820
|
*/
|
|
777
821
|
|
|
778
822
|
@layer components {
|
|
@@ -780,7 +824,6 @@
|
|
|
780
824
|
display: flex;
|
|
781
825
|
flex-wrap: wrap;
|
|
782
826
|
align-items: center;
|
|
783
|
-
gap: 0.25rem;
|
|
784
827
|
gap: var(--hl-space-1);
|
|
785
828
|
margin: 0;
|
|
786
829
|
padding: 0;
|
|
@@ -791,54 +834,39 @@
|
|
|
791
834
|
display: inline-flex;
|
|
792
835
|
align-items: center;
|
|
793
836
|
justify-content: center;
|
|
794
|
-
gap: 0.25rem;
|
|
795
837
|
gap: var(--hl-space-1);
|
|
796
|
-
min-
|
|
797
|
-
|
|
798
|
-
padding-
|
|
799
|
-
padding-right: 0.5rem;
|
|
800
|
-
padding-left: var(--hl-space-2);
|
|
801
|
-
padding-right: var(--hl-space-2);
|
|
802
|
-
border: 1px solid transparent;
|
|
838
|
+
min-inline-size: var(--hl-control-block-size);
|
|
839
|
+
block-size: var(--hl-control-block-size);
|
|
840
|
+
padding-inline: var(--hl-space-2);
|
|
803
841
|
border: var(--hl-border-width) solid transparent;
|
|
804
|
-
border-radius: 0.375rem;
|
|
805
842
|
border-radius: var(--hl-radius-md);
|
|
806
843
|
background: transparent;
|
|
807
|
-
color: hsl(222, 47%, 11%);
|
|
808
844
|
color: var(--hl-fg);
|
|
809
845
|
font: inherit;
|
|
810
|
-
font-size: 0.875rem;
|
|
811
846
|
font-size: var(--hl-text-sm);
|
|
812
|
-
-webkit-text-decoration: none;
|
|
813
847
|
text-decoration: none;
|
|
814
848
|
cursor: pointer;
|
|
815
|
-
transition: background-color 120ms cubic-bezier(0.2, 0, 0, 1);
|
|
816
849
|
transition: background-color var(--hl-duration-fast) var(--hl-ease-standard);
|
|
817
850
|
}
|
|
818
851
|
|
|
819
852
|
.hl-pagination-item:hover {
|
|
820
|
-
background: hsl(210, 40%, 96%);
|
|
821
853
|
background: var(--hl-surface-2);
|
|
822
854
|
}
|
|
823
855
|
|
|
824
856
|
.hl-pagination-item:focus-visible {
|
|
825
|
-
outline: 2px solid hsl(217, 91%, 60%);
|
|
826
857
|
outline: var(--hl-focus-ring);
|
|
827
|
-
outline-offset:
|
|
858
|
+
outline-offset: var(--hl-focus-offset);
|
|
828
859
|
}
|
|
829
860
|
|
|
830
861
|
.hl-pagination-item[aria-current='page'] {
|
|
831
|
-
background: hsl(221, 83%, 53%);
|
|
832
862
|
background: var(--hl-primary);
|
|
833
|
-
color: hsl(0, 0%, 100%);
|
|
834
863
|
color: var(--hl-primary-fg);
|
|
835
|
-
font-weight: 500;
|
|
836
864
|
font-weight: var(--hl-font-medium);
|
|
837
865
|
}
|
|
838
866
|
|
|
839
867
|
.hl-pagination-item[aria-disabled='true'],
|
|
840
868
|
.hl-pagination-item:disabled {
|
|
841
|
-
opacity:
|
|
869
|
+
opacity: var(--hl-disabled-opacity);
|
|
842
870
|
pointer-events: none;
|
|
843
871
|
}
|
|
844
872
|
|
|
@@ -846,214 +874,279 @@
|
|
|
846
874
|
display: inline-flex;
|
|
847
875
|
align-items: center;
|
|
848
876
|
justify-content: center;
|
|
849
|
-
min-
|
|
850
|
-
|
|
851
|
-
color: hsl(215, 16%, 47%);
|
|
877
|
+
min-inline-size: var(--hl-control-block-size);
|
|
878
|
+
block-size: var(--hl-control-block-size);
|
|
852
879
|
color: var(--hl-fg-subtle);
|
|
853
880
|
-webkit-user-select: none;
|
|
854
|
-
-moz-user-select: none;
|
|
855
881
|
user-select: none;
|
|
856
882
|
}
|
|
883
|
+
|
|
884
|
+
@media (forced-colors: active) {
|
|
885
|
+
.hl-pagination-item[aria-current='page'] {
|
|
886
|
+
border-color: Highlight;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
.hl-pagination-item[aria-disabled='true'],
|
|
890
|
+
.hl-pagination-item:disabled {
|
|
891
|
+
color: GrayText;
|
|
892
|
+
}
|
|
893
|
+
}
|
|
857
894
|
}
|
|
858
895
|
|
|
859
896
|
/**
|
|
860
897
|
* Separator: `<hr class="hl-separator">` or
|
|
861
898
|
* `<div class="hl-separator" role="separator" aria-orientation="vertical">`.
|
|
899
|
+
* Pure CSS; there is no enhancer.
|
|
900
|
+
* data-hl-orientation: vertical (alternative to aria-orientation)
|
|
862
901
|
*/
|
|
863
902
|
|
|
864
903
|
@layer components {
|
|
865
904
|
.hl-separator {
|
|
866
905
|
flex: none;
|
|
867
906
|
border: 0;
|
|
868
|
-
background: hsl(214, 32%, 91%);
|
|
869
907
|
background: var(--hl-border);
|
|
870
908
|
}
|
|
871
909
|
|
|
872
|
-
.hl-separator:not([aria-orientation='vertical']
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
margin-top: 1rem;
|
|
877
|
-
margin-bottom: 1rem;
|
|
878
|
-
margin-top: var(--hl-space-4);
|
|
879
|
-
margin-bottom: var(--hl-space-4);
|
|
910
|
+
.hl-separator:not([aria-orientation='vertical'], [data-hl-orientation='vertical']) {
|
|
911
|
+
inline-size: 100%;
|
|
912
|
+
block-size: var(--hl-border-width);
|
|
913
|
+
margin-block: var(--hl-space-4);
|
|
880
914
|
}
|
|
881
915
|
|
|
882
916
|
.hl-separator[aria-orientation='vertical'],
|
|
883
917
|
.hl-separator[data-hl-orientation='vertical'] {
|
|
884
918
|
align-self: stretch;
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
margin-left: 1rem;
|
|
889
|
-
margin-right: 1rem;
|
|
890
|
-
margin-left: var(--hl-space-4);
|
|
891
|
-
margin-right: var(--hl-space-4);
|
|
919
|
+
inline-size: var(--hl-border-width);
|
|
920
|
+
min-block-size: 1rem;
|
|
921
|
+
margin-inline: var(--hl-space-4);
|
|
892
922
|
}
|
|
893
923
|
}
|
|
894
924
|
|
|
895
925
|
/* Overlays */
|
|
896
926
|
|
|
927
|
+
/**
|
|
928
|
+
* Modal: a native `<dialog class="hl-modal">` (or `<dialog data-hl-modal>`)
|
|
929
|
+
* with optional `.hl-modal-header`, `.hl-modal-body`, and `.hl-modal-footer`.
|
|
930
|
+
*
|
|
931
|
+
* No-JS baseline: `<button command="show-modal" commandfor="id">` opens it and
|
|
932
|
+
* `command="close"` closes it; Escape and the backdrop are native. The
|
|
933
|
+
* enhancer only adds focus return, backdrop dismiss, and the open API, and
|
|
934
|
+
* reads nothing beyond `data-hl-modal`.
|
|
935
|
+
*/
|
|
936
|
+
|
|
897
937
|
@layer components {
|
|
898
|
-
.hl-modal {
|
|
938
|
+
:is(.hl-modal, dialog[data-hl-modal]) {
|
|
939
|
+
inline-size: min(90vi, var(--hl-modal-inline-size));
|
|
940
|
+
max-inline-size: none;
|
|
941
|
+
padding: 0;
|
|
899
942
|
border: none;
|
|
900
|
-
border-radius: 0.5rem;
|
|
901
943
|
border-radius: var(--hl-radius-lg);
|
|
902
|
-
padding: 0;
|
|
903
|
-
max-width: min(90vw, 640px);
|
|
904
|
-
width: 100%;
|
|
905
|
-
background: hsl(0, 0%, 100%);
|
|
906
944
|
background: var(--hl-surface);
|
|
907
|
-
color: hsl(222, 47%, 11%);
|
|
908
945
|
color: var(--hl-fg);
|
|
909
|
-
box-shadow: 0 10px 15px -3px hsla(222, 47%, 11%, 0.1), 0 4px 6px -4px hsla(222, 47%, 11%, 0.1);
|
|
910
946
|
box-shadow: var(--hl-overlay-shadow);
|
|
947
|
+
transition:
|
|
948
|
+
opacity var(--hl-duration-base) var(--hl-ease-standard),
|
|
949
|
+
translate var(--hl-duration-base) var(--hl-ease-standard),
|
|
950
|
+
display var(--hl-duration-base) allow-discrete,
|
|
951
|
+
overlay var(--hl-duration-base) allow-discrete;
|
|
911
952
|
}
|
|
912
953
|
|
|
913
|
-
.
|
|
914
|
-
|
|
954
|
+
/* Closed state doubles as the exit target of the transition. */
|
|
955
|
+
:is(.hl-modal, dialog[data-hl-modal]):not([open]) {
|
|
956
|
+
opacity: 0;
|
|
957
|
+
translate: 0 var(--hl-space-2);
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
@starting-style {
|
|
961
|
+
:is(.hl-modal, dialog[data-hl-modal])[open] {
|
|
962
|
+
opacity: 0;
|
|
963
|
+
translate: 0 var(--hl-space-2);
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
:is(.hl-modal, dialog[data-hl-modal])::backdrop {
|
|
915
968
|
background: var(--hl-scrim);
|
|
969
|
+
opacity: 0;
|
|
970
|
+
transition:
|
|
971
|
+
opacity var(--hl-duration-base) var(--hl-ease-standard),
|
|
972
|
+
display var(--hl-duration-base) allow-discrete,
|
|
973
|
+
overlay var(--hl-duration-base) allow-discrete;
|
|
916
974
|
}
|
|
917
975
|
|
|
918
|
-
.hl-modal
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
976
|
+
:is(.hl-modal, dialog[data-hl-modal])[open]::backdrop {
|
|
977
|
+
opacity: 1;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
@starting-style {
|
|
981
|
+
:is(.hl-modal, dialog[data-hl-modal])[open]::backdrop {
|
|
982
|
+
opacity: 0;
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
:is(.hl-modal, dialog[data-hl-modal]) :is(.hl-modal-header, .hl-modal-body, .hl-modal-footer) {
|
|
922
987
|
padding: var(--hl-space-4);
|
|
923
988
|
}
|
|
924
989
|
|
|
925
|
-
.hl-modal .hl-modal-header {
|
|
926
|
-
border-
|
|
927
|
-
border-bottom: 1px solid var(--hl-border);
|
|
990
|
+
:is(.hl-modal, dialog[data-hl-modal]) .hl-modal-header {
|
|
991
|
+
border-block-end: var(--hl-border-width) solid var(--hl-border);
|
|
928
992
|
}
|
|
929
993
|
|
|
930
|
-
.hl-modal .hl-modal-footer {
|
|
931
|
-
border-
|
|
932
|
-
border-top: 1px solid var(--hl-border);
|
|
994
|
+
:is(.hl-modal, dialog[data-hl-modal]) .hl-modal-footer {
|
|
995
|
+
border-block-start: var(--hl-border-width) solid var(--hl-border);
|
|
933
996
|
}
|
|
934
997
|
|
|
935
|
-
.
|
|
936
|
-
|
|
998
|
+
/* Interactive children inside the dialog get the standard ring. */
|
|
999
|
+
:is(.hl-modal, dialog[data-hl-modal])
|
|
1000
|
+
:is(a, button, input, select, textarea, [tabindex]):focus-visible {
|
|
937
1001
|
outline: var(--hl-focus-ring);
|
|
938
|
-
outline-offset:
|
|
1002
|
+
outline-offset: var(--hl-focus-offset);
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
/* The dialog loses its shadow in forced colors; a border keeps its edge. */
|
|
1006
|
+
@media (forced-colors: active) {
|
|
1007
|
+
:is(.hl-modal, dialog[data-hl-modal]) {
|
|
1008
|
+
border: var(--hl-border-width) solid CanvasText;
|
|
1009
|
+
}
|
|
939
1010
|
}
|
|
940
1011
|
}
|
|
941
1012
|
|
|
1013
|
+
/**
|
|
1014
|
+
* Drawer: a native `<dialog class="hl-drawer">` (or `<dialog data-hl-drawer>`)
|
|
1015
|
+
* pinned to one inline edge of the viewport, with optional `.hl-drawer-header`,
|
|
1016
|
+
* `.hl-drawer-body`, and `.hl-drawer-footer`.
|
|
1017
|
+
*
|
|
1018
|
+
* No-JS baseline: `<button command="show-modal" commandfor="id">` opens it and
|
|
1019
|
+
* `command="close"` closes it; Escape is native. The enhancer only adds focus
|
|
1020
|
+
* return, backdrop dismiss, and the open API.
|
|
1021
|
+
* data-hl-side: start | end (default). Logical edges, so they flip under RTL.
|
|
1022
|
+
*/
|
|
1023
|
+
|
|
942
1024
|
@layer components {
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
1025
|
+
:is(.hl-drawer, dialog[data-hl-drawer]) {
|
|
1026
|
+
--_slide: 100%;
|
|
1027
|
+
|
|
1028
|
+
inset-block: 0;
|
|
1029
|
+
inset-inline: auto 0;
|
|
1030
|
+
inline-size: min(90vi, var(--hl-overlay-inline-size));
|
|
1031
|
+
block-size: 100dvb;
|
|
1032
|
+
max-block-size: 100dvb;
|
|
1033
|
+
max-inline-size: none;
|
|
948
1034
|
margin: 0;
|
|
949
|
-
|
|
1035
|
+
padding: 0;
|
|
1036
|
+
border: none;
|
|
950
1037
|
background: var(--hl-surface);
|
|
951
|
-
color: hsl(222, 47%, 11%);
|
|
952
1038
|
color: var(--hl-fg);
|
|
953
|
-
box-shadow: 0 10px 15px -3px hsla(222, 47%, 11%, 0.1), 0 4px 6px -4px hsla(222, 47%, 11%, 0.1);
|
|
954
1039
|
box-shadow: var(--hl-overlay-shadow);
|
|
1040
|
+
transition:
|
|
1041
|
+
translate var(--hl-duration-slow) var(--hl-ease-emphasized),
|
|
1042
|
+
display var(--hl-duration-slow) allow-discrete,
|
|
1043
|
+
overlay var(--hl-duration-slow) allow-discrete;
|
|
955
1044
|
}
|
|
956
1045
|
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
background: var(--hl-scrim);
|
|
960
|
-
}
|
|
1046
|
+
:is(.hl-drawer, dialog[data-hl-drawer])[data-hl-side='start'] {
|
|
1047
|
+
--_slide: -100%;
|
|
961
1048
|
|
|
962
|
-
|
|
963
|
-
animation: hl-drawer-in-right 180ms cubic-bezier(0.2, 0, 0, 1);
|
|
964
|
-
animation: hl-drawer-in-right var(--hl-duration-base) var(--hl-ease-standard);
|
|
1049
|
+
inset-inline: 0 auto;
|
|
965
1050
|
}
|
|
966
1051
|
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
1052
|
+
/* `translate` is physical, so the slide direction mirrors under RTL. */
|
|
1053
|
+
:is(.hl-drawer, dialog[data-hl-drawer]):dir(rtl) {
|
|
1054
|
+
--_slide: -100%;
|
|
1055
|
+
}
|
|
971
1056
|
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
}
|
|
1057
|
+
:is(.hl-drawer, dialog[data-hl-drawer])[data-hl-side='start']:dir(rtl) {
|
|
1058
|
+
--_slide: 100%;
|
|
975
1059
|
}
|
|
976
1060
|
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
1061
|
+
/* Closed state doubles as the exit target of the slide. */
|
|
1062
|
+
:is(.hl-drawer, dialog[data-hl-drawer]):not([open]) {
|
|
1063
|
+
translate: var(--_slide) 0;
|
|
1064
|
+
}
|
|
981
1065
|
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
1066
|
+
/* A column so the body scrolls between a fixed header and footer. */
|
|
1067
|
+
:is(.hl-drawer, dialog[data-hl-drawer])[open] {
|
|
1068
|
+
display: flex;
|
|
1069
|
+
flex-direction: column;
|
|
985
1070
|
}
|
|
986
1071
|
|
|
987
|
-
@
|
|
988
|
-
.hl-drawer[open] {
|
|
989
|
-
|
|
1072
|
+
@starting-style {
|
|
1073
|
+
:is(.hl-drawer, dialog[data-hl-drawer])[open] {
|
|
1074
|
+
translate: var(--_slide) 0;
|
|
990
1075
|
}
|
|
991
1076
|
}
|
|
992
1077
|
|
|
993
|
-
.hl-drawer[data-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
1078
|
+
:is(.hl-drawer, dialog[data-hl-drawer])::backdrop {
|
|
1079
|
+
background: var(--hl-scrim);
|
|
1080
|
+
opacity: 0;
|
|
1081
|
+
transition:
|
|
1082
|
+
opacity var(--hl-duration-slow) var(--hl-ease-standard),
|
|
1083
|
+
display var(--hl-duration-slow) allow-discrete,
|
|
1084
|
+
overlay var(--hl-duration-slow) allow-discrete;
|
|
999
1085
|
}
|
|
1000
1086
|
|
|
1001
|
-
.hl-drawer[data-
|
|
1002
|
-
|
|
1087
|
+
:is(.hl-drawer, dialog[data-hl-drawer])[open]::backdrop {
|
|
1088
|
+
opacity: 1;
|
|
1003
1089
|
}
|
|
1004
1090
|
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
bottom: 0;
|
|
1010
|
-
left: auto;
|
|
1091
|
+
@starting-style {
|
|
1092
|
+
:is(.hl-drawer, dialog[data-hl-drawer])[open]::backdrop {
|
|
1093
|
+
opacity: 0;
|
|
1094
|
+
}
|
|
1011
1095
|
}
|
|
1012
1096
|
|
|
1013
|
-
.hl-drawer
|
|
1014
|
-
|
|
1015
|
-
.hl-drawer .hl-drawer-footer {
|
|
1016
|
-
padding: 1rem;
|
|
1097
|
+
:is(.hl-drawer, dialog[data-hl-drawer])
|
|
1098
|
+
:is(.hl-drawer-header, .hl-drawer-body, .hl-drawer-footer) {
|
|
1017
1099
|
padding: var(--hl-space-4);
|
|
1018
1100
|
}
|
|
1019
1101
|
|
|
1020
|
-
.hl-drawer .hl-drawer-
|
|
1021
|
-
|
|
1022
|
-
|
|
1102
|
+
:is(.hl-drawer, dialog[data-hl-drawer]) .hl-drawer-body {
|
|
1103
|
+
flex: 1 1 auto;
|
|
1104
|
+
overflow-y: auto;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
:is(.hl-drawer, dialog[data-hl-drawer]) .hl-drawer-header {
|
|
1108
|
+
border-block-end: var(--hl-border-width) solid var(--hl-border);
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
:is(.hl-drawer, dialog[data-hl-drawer]) .hl-drawer-footer {
|
|
1112
|
+
border-block-start: var(--hl-border-width) solid var(--hl-border);
|
|
1023
1113
|
}
|
|
1024
1114
|
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1115
|
+
/* Interactive children inside the drawer get the standard ring. */
|
|
1116
|
+
:is(.hl-drawer, dialog[data-hl-drawer])
|
|
1117
|
+
:is(a, button, input, select, textarea, [tabindex]):focus-visible {
|
|
1118
|
+
outline: var(--hl-focus-ring);
|
|
1119
|
+
outline-offset: var(--hl-focus-offset);
|
|
1028
1120
|
}
|
|
1029
1121
|
}
|
|
1030
1122
|
|
|
1031
1123
|
/**
|
|
1032
1124
|
* Popover: a `[popover] [data-hl-popover]` surface opened by a
|
|
1033
|
-
* `<button popovertarget="
|
|
1034
|
-
*
|
|
1035
|
-
*
|
|
1036
|
-
*
|
|
1125
|
+
* `<button popovertarget="...">` (or `command="toggle-popover"`).
|
|
1126
|
+
*
|
|
1127
|
+
* No-JS baseline: the browser owns the top layer, light dismiss, and Escape,
|
|
1128
|
+
* so the popover is fully usable with `popover` and `popovertarget` in the
|
|
1129
|
+
* markup. The enhancer only mirrors `aria-expanded`, adds optional hover, and
|
|
1130
|
+
* runs the JS positioning fallback on engines without CSS anchor positioning.
|
|
1131
|
+
* data-hl-popover: the surface (opts into the enhancer)
|
|
1037
1132
|
*/
|
|
1038
1133
|
|
|
1039
1134
|
@layer components {
|
|
1040
1135
|
[data-hl-popover] {
|
|
1041
1136
|
margin: 0;
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
max-width: min(92vw, 22rem);
|
|
1045
|
-
border: 1px solid hsl(214, 32%, 91%);
|
|
1137
|
+
inline-size: max-content;
|
|
1138
|
+
max-inline-size: min(92vi, 22rem);
|
|
1046
1139
|
border: var(--hl-border-width) solid var(--hl-border);
|
|
1047
|
-
border-radius: 0.5rem;
|
|
1048
1140
|
border-radius: var(--hl-radius-lg);
|
|
1049
|
-
padding: 0.75rem;
|
|
1050
1141
|
padding: var(--hl-space-3);
|
|
1051
|
-
background: hsl(0, 0%, 100%);
|
|
1052
1142
|
background: var(--hl-surface);
|
|
1053
|
-
color: hsl(222, 47%, 11%);
|
|
1054
1143
|
color: var(--hl-fg);
|
|
1055
|
-
box-shadow: 0 10px 15px -3px hsla(222, 47%, 11%, 0.1), 0 4px 6px -4px hsla(222, 47%, 11%, 0.1);
|
|
1056
1144
|
box-shadow: var(--hl-overlay-shadow);
|
|
1145
|
+
transition:
|
|
1146
|
+
opacity var(--hl-duration-fast) var(--hl-ease-standard),
|
|
1147
|
+
translate var(--hl-duration-fast) var(--hl-ease-standard),
|
|
1148
|
+
display var(--hl-duration-fast) allow-discrete,
|
|
1149
|
+
overlay var(--hl-duration-fast) allow-discrete;
|
|
1057
1150
|
}
|
|
1058
1151
|
|
|
1059
1152
|
/* Until the `popover` attribute is present (author omitted it and JS hasn't
|
|
@@ -1062,11 +1155,21 @@
|
|
|
1062
1155
|
display: none;
|
|
1063
1156
|
}
|
|
1064
1157
|
|
|
1065
|
-
/* Engines without the Popover API can't
|
|
1066
|
-
|
|
1158
|
+
/* Closed state and exit target. Engines without the Popover API can't
|
|
1159
|
+
promote it to the top layer, so the JS fallback positions it; the z-index
|
|
1160
|
+
lands it above content. Those engines drop this rule, so nothing is
|
|
1161
|
+
hidden by accident. */
|
|
1067
1162
|
[data-hl-popover]:not(:popover-open) {
|
|
1068
|
-
z-index: 1400;
|
|
1069
1163
|
z-index: var(--hl-z-popover);
|
|
1164
|
+
opacity: 0;
|
|
1165
|
+
translate: 0 -0.25rem;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
@starting-style {
|
|
1169
|
+
[data-hl-popover]:popover-open {
|
|
1170
|
+
opacity: 0;
|
|
1171
|
+
translate: 0 -0.25rem;
|
|
1172
|
+
}
|
|
1070
1173
|
}
|
|
1071
1174
|
|
|
1072
1175
|
/* Modern placement: anchor to the invoking control (the popover's implicit
|
|
@@ -1075,24 +1178,33 @@
|
|
|
1075
1178
|
@supports (position-area: block-end) {
|
|
1076
1179
|
[data-hl-popover] {
|
|
1077
1180
|
position: fixed;
|
|
1078
|
-
inset-area: block-end;
|
|
1079
1181
|
position-area: block-end;
|
|
1080
1182
|
position-try-fallbacks: flip-block, flip-inline;
|
|
1081
|
-
margin-
|
|
1082
|
-
margin-bottom: 0.25rem;
|
|
1083
|
-
margin-top: var(--hl-space-1);
|
|
1084
|
-
margin-bottom: var(--hl-space-1);
|
|
1183
|
+
margin-block: var(--hl-space-1);
|
|
1085
1184
|
}
|
|
1086
1185
|
}
|
|
1186
|
+
|
|
1187
|
+
/* Interactive children inside the surface get the standard ring. */
|
|
1188
|
+
[data-hl-popover] :is(a, button, input, select, textarea, [tabindex]):focus-visible {
|
|
1189
|
+
outline: var(--hl-focus-ring);
|
|
1190
|
+
outline-offset: var(--hl-focus-offset);
|
|
1191
|
+
}
|
|
1087
1192
|
}
|
|
1088
1193
|
|
|
1089
1194
|
/**
|
|
1090
1195
|
* Tooltip: a `[role="tooltip"]` element described by a `[data-hl-tooltip]`
|
|
1091
|
-
* trigger.
|
|
1092
|
-
*
|
|
1093
|
-
* the trigger
|
|
1094
|
-
*
|
|
1095
|
-
*
|
|
1196
|
+
* trigger.
|
|
1197
|
+
*
|
|
1198
|
+
* No-JS baseline: the tip (the trigger's next sibling, carrying `hidden`)
|
|
1199
|
+
* shows on the trigger's `:hover`/`:focus-visible`. When the enhancer runs it
|
|
1200
|
+
* marks the trigger `data-hl-tooltip-managed`, promotes the tip to a
|
|
1201
|
+
* `popover="manual"` in the top layer where available (otherwise toggles
|
|
1202
|
+
* `hidden`), and drives visibility through `data-hl-tooltip-open` with show
|
|
1203
|
+
* and hide delays, a grace period, and Escape to dismiss.
|
|
1204
|
+
* data-hl-tooltip: the trigger
|
|
1205
|
+
* data-hl-placement: top (default) | bottom | left | right, on the trigger
|
|
1206
|
+
* data-hl-tooltip-managed: set on the trigger by the enhancer
|
|
1207
|
+
* data-hl-tooltip-open: set on the tip while shown
|
|
1096
1208
|
*/
|
|
1097
1209
|
|
|
1098
1210
|
@layer components {
|
|
@@ -1100,33 +1212,44 @@
|
|
|
1100
1212
|
/* Fallback placement: the JS positioner writes inline position/inset on
|
|
1101
1213
|
engines without CSS anchor positioning. */
|
|
1102
1214
|
position: absolute;
|
|
1103
|
-
z-index: 1600;
|
|
1104
1215
|
z-index: var(--hl-z-tooltip);
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
max-width: 32ch;
|
|
1216
|
+
inline-size: max-content;
|
|
1217
|
+
max-inline-size: 32ch;
|
|
1108
1218
|
margin: 0;
|
|
1109
|
-
padding: 0.25rem 0.5rem;
|
|
1110
1219
|
padding: var(--hl-space-1) var(--hl-space-2);
|
|
1111
|
-
border
|
|
1220
|
+
border: 0;
|
|
1112
1221
|
border-radius: var(--hl-radius-sm);
|
|
1113
|
-
background: hsl(222, 47%, 11%);
|
|
1114
1222
|
background: var(--hl-fg);
|
|
1115
|
-
color: hsl(0, 0%, 100%);
|
|
1116
1223
|
color: var(--hl-surface);
|
|
1117
|
-
font-size: 0.875rem;
|
|
1118
1224
|
font-size: var(--hl-text-sm);
|
|
1225
|
+
opacity: 0;
|
|
1226
|
+
translate: 0 0.25rem;
|
|
1227
|
+
transition:
|
|
1228
|
+
opacity var(--hl-duration-fast) var(--hl-ease-standard),
|
|
1229
|
+
translate var(--hl-duration-fast) var(--hl-ease-standard),
|
|
1230
|
+
display var(--hl-duration-fast) allow-discrete,
|
|
1231
|
+
overlay var(--hl-duration-fast) allow-discrete;
|
|
1119
1232
|
}
|
|
1120
1233
|
|
|
1121
1234
|
[role='tooltip'][hidden] {
|
|
1122
1235
|
display: none;
|
|
1123
1236
|
}
|
|
1124
1237
|
|
|
1125
|
-
/*
|
|
1126
|
-
|
|
1127
|
-
[
|
|
1128
|
-
[data-hl-tooltip]:not([data-hl-tooltip-managed]):focus-visible + [role='tooltip'] {
|
|
1238
|
+
/* Shown states: the enhanced popover, the enhanced `hidden` fallback, and
|
|
1239
|
+
the no-JS hover/focus baseline (suppressed once the trigger is managed). */
|
|
1240
|
+
[role='tooltip']:is(:popover-open, [data-hl-tooltip-open]),
|
|
1241
|
+
[data-hl-tooltip]:not([data-hl-tooltip-managed]):is(:hover, :focus-visible) + [role='tooltip'] {
|
|
1129
1242
|
display: block;
|
|
1243
|
+
opacity: 1;
|
|
1244
|
+
translate: 0 0;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
@starting-style {
|
|
1248
|
+
[role='tooltip']:is(:popover-open, [data-hl-tooltip-open]),
|
|
1249
|
+
[data-hl-tooltip]:not([data-hl-tooltip-managed]):is(:hover, :focus-visible) + [role='tooltip'] {
|
|
1250
|
+
opacity: 0;
|
|
1251
|
+
translate: 0 0.25rem;
|
|
1252
|
+
}
|
|
1130
1253
|
}
|
|
1131
1254
|
|
|
1132
1255
|
/* Modern placement: pin above the trigger via the anchor-name the enhancer
|
|
@@ -1134,23 +1257,35 @@
|
|
|
1134
1257
|
@supports (anchor-name: --x) {
|
|
1135
1258
|
[role='tooltip'] {
|
|
1136
1259
|
position: fixed;
|
|
1137
|
-
inset
|
|
1260
|
+
inset: auto;
|
|
1138
1261
|
position-area: block-start;
|
|
1139
1262
|
position-try-fallbacks: flip-block;
|
|
1140
|
-
margin-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1263
|
+
margin-block: var(--hl-space-1);
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
/* Inverted colors flatten away; keep a visible edge on the system canvas. */
|
|
1268
|
+
@media (forced-colors: active) {
|
|
1269
|
+
[role='tooltip'] {
|
|
1270
|
+
border: var(--hl-border-width) solid CanvasText;
|
|
1144
1271
|
}
|
|
1145
1272
|
}
|
|
1146
1273
|
}
|
|
1147
1274
|
|
|
1148
1275
|
/**
|
|
1149
1276
|
* Dropdown menu button: `<div data-hl-dropdown>` wrapping a
|
|
1150
|
-
* `[data-hl-dropdown-trigger]` button and a `[data-hl-dropdown-menu]` list.
|
|
1151
|
-
*
|
|
1152
|
-
*
|
|
1153
|
-
*
|
|
1277
|
+
* `[data-hl-dropdown-trigger]` button and a `[data-hl-dropdown-menu]` list.
|
|
1278
|
+
*
|
|
1279
|
+
* No-JS baseline: the menu is a native `popover` and the trigger points at it
|
|
1280
|
+
* with `popovertarget`, so opening, Escape, and light dismiss work before any
|
|
1281
|
+
* script runs; both attributes must be in the markup. The enhancer adds arrow
|
|
1282
|
+
* keys, typeahead, checkable items, and focus return, and reads:
|
|
1283
|
+
* data-hl-dropdown: root
|
|
1284
|
+
* data-hl-dropdown-trigger: the button
|
|
1285
|
+
* data-hl-dropdown-menu: the `<ul>` (or any list) of items
|
|
1286
|
+
* data-hl-value: an item's value for `hl:select`
|
|
1287
|
+
* Items are `role="menuitem"`, `menuitemcheckbox`, or `menuitemradio`, either
|
|
1288
|
+
* directly in the list, inside `<li>`, or inside `<li><ul role="group">`.
|
|
1154
1289
|
*/
|
|
1155
1290
|
|
|
1156
1291
|
@layer components {
|
|
@@ -1160,85 +1295,133 @@
|
|
|
1160
1295
|
|
|
1161
1296
|
[data-hl-dropdown-menu] {
|
|
1162
1297
|
margin: 0;
|
|
1163
|
-
min-
|
|
1164
|
-
border: 1px solid hsl(214, 32%, 91%);
|
|
1298
|
+
min-inline-size: 10rem;
|
|
1165
1299
|
border: var(--hl-border-width) solid var(--hl-border);
|
|
1166
|
-
border-radius: 0.5rem;
|
|
1167
1300
|
border-radius: var(--hl-radius-lg);
|
|
1168
|
-
background: hsl(0, 0%, 100%);
|
|
1169
1301
|
background: var(--hl-surface);
|
|
1170
|
-
box-shadow: 0 10px 15px -3px hsla(222, 47%, 11%, 0.1), 0 4px 6px -4px hsla(222, 47%, 11%, 0.1);
|
|
1171
1302
|
box-shadow: var(--hl-overlay-shadow);
|
|
1172
|
-
padding: 0.25rem;
|
|
1173
1303
|
padding: var(--hl-space-1);
|
|
1174
1304
|
list-style: none;
|
|
1305
|
+
transition:
|
|
1306
|
+
opacity var(--hl-duration-fast) var(--hl-ease-standard),
|
|
1307
|
+
translate var(--hl-duration-fast) var(--hl-ease-standard),
|
|
1308
|
+
display var(--hl-duration-fast) allow-discrete,
|
|
1309
|
+
overlay var(--hl-duration-fast) allow-discrete;
|
|
1175
1310
|
}
|
|
1176
1311
|
|
|
1177
|
-
/*
|
|
1178
|
-
|
|
1179
|
-
display: none;
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1312
|
+
/* Closed state doubles as the exit target. Engines without the Popover API
|
|
1313
|
+
drop this rule, so nothing is hidden by accident. */
|
|
1182
1314
|
[data-hl-dropdown-menu]:not(:popover-open) {
|
|
1183
|
-
z-index: 1000;
|
|
1184
1315
|
z-index: var(--hl-z-dropdown);
|
|
1316
|
+
opacity: 0;
|
|
1317
|
+
translate: 0 -0.25rem;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
@starting-style {
|
|
1321
|
+
[data-hl-dropdown-menu]:popover-open {
|
|
1322
|
+
opacity: 0;
|
|
1323
|
+
translate: 0 -0.25rem;
|
|
1324
|
+
}
|
|
1185
1325
|
}
|
|
1186
1326
|
|
|
1187
1327
|
/* Open below the trigger, start-aligned, flipping when cramped. */
|
|
1188
1328
|
@supports (position-area: block-end) {
|
|
1189
1329
|
[data-hl-dropdown-menu] {
|
|
1190
1330
|
position: fixed;
|
|
1191
|
-
inset-area: block-end span-inline-end;
|
|
1192
1331
|
position-area: block-end span-inline-end;
|
|
1193
1332
|
position-try-fallbacks: flip-block, flip-inline;
|
|
1194
|
-
margin-
|
|
1195
|
-
margin-bottom: 0.25rem;
|
|
1196
|
-
margin-top: var(--hl-space-1);
|
|
1197
|
-
margin-bottom: var(--hl-space-1);
|
|
1333
|
+
margin-block: var(--hl-space-1);
|
|
1198
1334
|
}
|
|
1199
1335
|
}
|
|
1200
1336
|
|
|
1201
|
-
[data-hl-dropdown-menu] [role='
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1337
|
+
[data-hl-dropdown-menu] [role='group'] {
|
|
1338
|
+
margin: 0;
|
|
1339
|
+
padding: 0;
|
|
1340
|
+
list-style: none;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
[data-hl-dropdown-menu] [role^='menuitem'] {
|
|
1344
|
+
display: flex;
|
|
1345
|
+
align-items: center;
|
|
1346
|
+
gap: var(--hl-space-2);
|
|
1347
|
+
inline-size: 100%;
|
|
1205
1348
|
padding: var(--hl-space-2) var(--hl-space-3);
|
|
1206
1349
|
border: none;
|
|
1207
|
-
border-radius: 0.25rem;
|
|
1208
1350
|
border-radius: var(--hl-radius-sm);
|
|
1209
1351
|
background: transparent;
|
|
1210
|
-
text-align:
|
|
1352
|
+
text-align: start;
|
|
1211
1353
|
cursor: pointer;
|
|
1212
1354
|
color: inherit;
|
|
1213
1355
|
font: inherit;
|
|
1214
1356
|
}
|
|
1215
1357
|
|
|
1216
|
-
[data-hl-dropdown-menu] [role
|
|
1217
|
-
[data-hl-dropdown-menu] [role='menuitem'][data-hl-active] {
|
|
1218
|
-
background: hsl(210, 40%, 96%);
|
|
1358
|
+
[data-hl-dropdown-menu] [role^='menuitem']:hover {
|
|
1219
1359
|
background: var(--hl-surface-2);
|
|
1220
1360
|
}
|
|
1221
1361
|
|
|
1222
|
-
[data-hl-dropdown-menu] [role
|
|
1223
|
-
outline: 2px solid hsl(217, 91%, 60%);
|
|
1362
|
+
[data-hl-dropdown-menu] [role^='menuitem']:focus-visible {
|
|
1224
1363
|
outline: var(--hl-focus-ring);
|
|
1225
|
-
outline-offset: -
|
|
1364
|
+
outline-offset: calc(var(--hl-focus-offset) * -1);
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
/* Checkable items reserve room for a mark so labels line up. */
|
|
1368
|
+
[data-hl-dropdown-menu] :is([role='menuitemcheckbox'], [role='menuitemradio'])::before {
|
|
1369
|
+
content: '';
|
|
1370
|
+
flex: none;
|
|
1371
|
+
inline-size: 1em;
|
|
1372
|
+
block-size: 1em;
|
|
1373
|
+
line-height: 1;
|
|
1374
|
+
text-align: center;
|
|
1375
|
+
color: var(--hl-primary);
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
[data-hl-dropdown-menu] [role='menuitemcheckbox'][aria-checked='true']::before {
|
|
1379
|
+
content: '\2713';
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
[data-hl-dropdown-menu] [role='menuitemradio'][aria-checked='true']::before {
|
|
1383
|
+
background: currentcolor;
|
|
1384
|
+
border-radius: var(--hl-radius-full);
|
|
1385
|
+
scale: 0.5;
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
[data-hl-dropdown-menu] [role^='menuitem']:is(:disabled, [aria-disabled='true']) {
|
|
1389
|
+
opacity: var(--hl-disabled-opacity);
|
|
1390
|
+
cursor: not-allowed;
|
|
1226
1391
|
}
|
|
1227
1392
|
|
|
1228
1393
|
[data-hl-dropdown-menu] [role='separator'] {
|
|
1229
|
-
|
|
1230
|
-
margin: 0.25rem 0;
|
|
1394
|
+
block-size: var(--hl-border-width);
|
|
1231
1395
|
margin: var(--hl-space-1) 0;
|
|
1232
|
-
background: hsl(214, 32%, 91%);
|
|
1233
1396
|
background: var(--hl-border);
|
|
1234
1397
|
border: none;
|
|
1235
1398
|
}
|
|
1399
|
+
|
|
1400
|
+
@media (forced-colors: active) {
|
|
1401
|
+
[data-hl-dropdown-menu] [role^='menuitem']:is(:disabled, [aria-disabled='true']) {
|
|
1402
|
+
color: GrayText;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
[data-hl-dropdown-menu] [role='separator'] {
|
|
1406
|
+
background: CanvasText;
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1236
1409
|
}
|
|
1237
1410
|
|
|
1238
1411
|
/**
|
|
1239
|
-
* Menubar / navigation menu: `<ul data-hl-menu role="menubar">`
|
|
1240
|
-
*
|
|
1241
|
-
*
|
|
1412
|
+
* Menubar / navigation menu: `<ul data-hl-menu role="menubar">` of `<li>`
|
|
1413
|
+
* items, each optionally holding a trigger and a single-level submenu
|
|
1414
|
+
* (`<ul role="menu">` or `[data-hl-menu-submenu]`) as siblings inside the `<li>`.
|
|
1415
|
+
*
|
|
1416
|
+
* No-JS baseline: a submenu shows while its `<li>` is hovered or has focus
|
|
1417
|
+
* within it, so every link stays reachable by mouse and keyboard. The enhancer
|
|
1418
|
+
* marks the root `data-hl-ready`, after which it owns visibility (`hidden`
|
|
1419
|
+
* plus a top-layer `popover`) and adds roving focus, arrow keys, typeahead,
|
|
1420
|
+
* and checkable items. It reads:
|
|
1421
|
+
* data-hl-menu: root; `aria-orientation="vertical"` stacks it
|
|
1422
|
+
* data-hl-menu-submenu: a submenu without `role="menu"`
|
|
1423
|
+
* data-hl-value: a top-level trigger's value for `hl:change`
|
|
1424
|
+
* data-hl-ready: set by the enhancer
|
|
1242
1425
|
*/
|
|
1243
1426
|
|
|
1244
1427
|
@layer components {
|
|
@@ -1246,10 +1429,8 @@
|
|
|
1246
1429
|
display: flex;
|
|
1247
1430
|
flex-wrap: wrap;
|
|
1248
1431
|
align-items: center;
|
|
1249
|
-
gap: 0.25rem;
|
|
1250
1432
|
gap: var(--hl-space-1);
|
|
1251
1433
|
margin: 0;
|
|
1252
|
-
padding: 0.25rem;
|
|
1253
1434
|
padding: var(--hl-space-1);
|
|
1254
1435
|
list-style: none;
|
|
1255
1436
|
}
|
|
@@ -1263,268 +1444,294 @@
|
|
|
1263
1444
|
position: relative;
|
|
1264
1445
|
}
|
|
1265
1446
|
|
|
1266
|
-
[data-hl-menu] [role
|
|
1447
|
+
[data-hl-menu] [role^='menuitem'] {
|
|
1267
1448
|
display: flex;
|
|
1268
1449
|
align-items: center;
|
|
1269
|
-
gap: 0.5rem;
|
|
1270
1450
|
gap: var(--hl-space-2);
|
|
1271
|
-
|
|
1272
|
-
padding: 0.5rem 0.75rem;
|
|
1451
|
+
inline-size: 100%;
|
|
1273
1452
|
padding: var(--hl-space-2) var(--hl-space-3);
|
|
1274
1453
|
border: 0;
|
|
1275
|
-
border-radius: 0.375rem;
|
|
1276
1454
|
border-radius: var(--hl-radius-md);
|
|
1277
1455
|
background: transparent;
|
|
1278
|
-
color: hsl(222, 47%, 11%);
|
|
1279
1456
|
color: var(--hl-fg);
|
|
1280
1457
|
font: inherit;
|
|
1281
|
-
font-size: 0.875rem;
|
|
1282
1458
|
font-size: var(--hl-text-sm);
|
|
1283
|
-
text-align:
|
|
1284
|
-
-webkit-text-decoration: none;
|
|
1459
|
+
text-align: start;
|
|
1285
1460
|
text-decoration: none;
|
|
1286
1461
|
white-space: nowrap;
|
|
1287
1462
|
cursor: pointer;
|
|
1288
1463
|
}
|
|
1289
1464
|
|
|
1290
|
-
[data-hl-menu] [role
|
|
1291
|
-
|
|
1465
|
+
[data-hl-menu] [role^='menuitem']:hover,
|
|
1466
|
+
[data-hl-menu] [role^='menuitem'][aria-expanded='true'] {
|
|
1292
1467
|
background: var(--hl-surface-2);
|
|
1293
1468
|
}
|
|
1294
1469
|
|
|
1295
|
-
[data-hl-menu] [role
|
|
1296
|
-
outline: 2px solid hsl(217, 91%, 60%);
|
|
1470
|
+
[data-hl-menu] [role^='menuitem']:focus-visible {
|
|
1297
1471
|
outline: var(--hl-focus-ring);
|
|
1298
|
-
outline-offset: -
|
|
1472
|
+
outline-offset: calc(var(--hl-focus-offset) * -1);
|
|
1299
1473
|
}
|
|
1300
1474
|
|
|
1301
|
-
[data-hl-menu] [role
|
|
1302
|
-
|
|
1303
|
-
|
|
1475
|
+
[data-hl-menu] [role^='menuitem']:is(:disabled, [aria-disabled='true']) {
|
|
1476
|
+
opacity: var(--hl-disabled-opacity);
|
|
1477
|
+
cursor: not-allowed;
|
|
1304
1478
|
}
|
|
1305
1479
|
|
|
1306
|
-
|
|
1480
|
+
/* Submenu chevron: a rotated square corner at the inline end. */
|
|
1481
|
+
[data-hl-menu] [role^='menuitem'][aria-haspopup]::after {
|
|
1307
1482
|
content: '';
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
margin-
|
|
1311
|
-
border-
|
|
1312
|
-
border-
|
|
1313
|
-
|
|
1483
|
+
inline-size: 0.4rem;
|
|
1484
|
+
block-size: 0.4rem;
|
|
1485
|
+
margin-inline-start: auto;
|
|
1486
|
+
border-inline-end: 1.5px solid currentcolor;
|
|
1487
|
+
border-block-end: 1.5px solid currentcolor;
|
|
1488
|
+
rotate: 45deg;
|
|
1314
1489
|
opacity: 0.6;
|
|
1315
1490
|
}
|
|
1316
1491
|
|
|
1317
|
-
[data-hl-menu] [role='menu'] {
|
|
1492
|
+
[data-hl-menu] :is([role='menu'], [data-hl-menu-submenu]) {
|
|
1318
1493
|
position: absolute;
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
left: 0;
|
|
1322
|
-
z-index: 1000;
|
|
1494
|
+
inset-block-start: calc(100% + var(--hl-space-1));
|
|
1495
|
+
inset-inline-start: 0;
|
|
1323
1496
|
z-index: var(--hl-z-dropdown);
|
|
1324
|
-
min-
|
|
1497
|
+
min-inline-size: 12rem;
|
|
1325
1498
|
margin: 0;
|
|
1326
|
-
padding: 0.25rem;
|
|
1327
1499
|
padding: var(--hl-space-1);
|
|
1328
1500
|
list-style: none;
|
|
1329
|
-
background: hsl(0, 0%, 100%);
|
|
1330
1501
|
background: var(--hl-overlay);
|
|
1331
|
-
border: 1px solid hsl(214, 32%, 91%);
|
|
1332
1502
|
border: var(--hl-border-width) solid var(--hl-border);
|
|
1333
|
-
border-radius: 0.5rem;
|
|
1334
1503
|
border-radius: var(--hl-radius-lg);
|
|
1335
|
-
box-shadow: 0 10px 15px -3px hsla(222, 47%, 11%, 0.1), 0 4px 6px -4px hsla(222, 47%, 11%, 0.1);
|
|
1336
1504
|
box-shadow: var(--hl-overlay-shadow);
|
|
1505
|
+
transition:
|
|
1506
|
+
opacity var(--hl-duration-fast) var(--hl-ease-standard),
|
|
1507
|
+
translate var(--hl-duration-fast) var(--hl-ease-standard),
|
|
1508
|
+
display var(--hl-duration-fast) allow-discrete,
|
|
1509
|
+
overlay var(--hl-duration-fast) allow-discrete;
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
[data-hl-menu][aria-orientation='vertical'] :is([role='menu'], [data-hl-menu-submenu]) {
|
|
1513
|
+
inset-block-start: 0;
|
|
1514
|
+
inset-inline-start: calc(100% + var(--hl-space-1));
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
/* Closed states: `hidden` (enhancer without Popover API), a closed popover
|
|
1518
|
+
(enhancer with it), and the no-JS baseline below. Each is also the exit
|
|
1519
|
+
target of the transition. */
|
|
1520
|
+
[data-hl-menu]
|
|
1521
|
+
:is([role='menu'], [data-hl-menu-submenu]):is([hidden], [popover]:not(:popover-open)),
|
|
1522
|
+
[data-hl-menu]:not([data-hl-ready]) :is([role='menu'], [data-hl-menu-submenu]) {
|
|
1523
|
+
display: none;
|
|
1524
|
+
opacity: 0;
|
|
1525
|
+
translate: 0 -0.25rem;
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
/* No-JS baseline: reveal on hover or focus within the parent item. */
|
|
1529
|
+
[data-hl-menu]:not([data-hl-ready])
|
|
1530
|
+
li:is(:hover, :focus-within)
|
|
1531
|
+
> :is([role='menu'], [data-hl-menu-submenu]) {
|
|
1532
|
+
display: block;
|
|
1533
|
+
opacity: 1;
|
|
1534
|
+
translate: 0 0;
|
|
1337
1535
|
}
|
|
1338
1536
|
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1537
|
+
@starting-style {
|
|
1538
|
+
[data-hl-menu] :is([role='menu'], [data-hl-menu-submenu]) {
|
|
1539
|
+
opacity: 0;
|
|
1540
|
+
translate: 0 -0.25rem;
|
|
1541
|
+
}
|
|
1343
1542
|
}
|
|
1344
1543
|
|
|
1345
|
-
|
|
1346
|
-
|
|
1544
|
+
/* Enhanced path: the submenu is a native popover in the top layer, anchored
|
|
1545
|
+
to its trigger. The absolute-position rules above stay as the fallback for
|
|
1546
|
+
engines without the Popover API. */
|
|
1547
|
+
[data-hl-menu] :is([role='menu'], [data-hl-menu-submenu])[popover] {
|
|
1548
|
+
position: fixed;
|
|
1549
|
+
inset: auto;
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
@supports (position-area: block-end) {
|
|
1553
|
+
[data-hl-menu] :is([role='menu'], [data-hl-menu-submenu])[popover] {
|
|
1554
|
+
position-area: block-end span-inline-end;
|
|
1555
|
+
position-try-fallbacks: flip-block, flip-inline;
|
|
1556
|
+
margin-block: var(--hl-space-1);
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
[data-hl-menu][aria-orientation='vertical']
|
|
1560
|
+
:is([role='menu'], [data-hl-menu-submenu])[popover] {
|
|
1561
|
+
position-area: inline-end span-block-end;
|
|
1562
|
+
position-try-fallbacks: flip-inline, flip-block;
|
|
1563
|
+
margin-block: 0;
|
|
1564
|
+
margin-inline: var(--hl-space-1);
|
|
1565
|
+
}
|
|
1347
1566
|
}
|
|
1348
1567
|
|
|
1349
1568
|
[data-hl-menu] [role='separator'] {
|
|
1350
|
-
|
|
1351
|
-
height: var(--hl-border-width);
|
|
1352
|
-
margin: 0.25rem 0;
|
|
1569
|
+
block-size: var(--hl-border-width);
|
|
1353
1570
|
margin: var(--hl-space-1) 0;
|
|
1354
|
-
background: hsl(214, 32%, 91%);
|
|
1355
1571
|
background: var(--hl-border);
|
|
1356
1572
|
}
|
|
1573
|
+
|
|
1574
|
+
@media (forced-colors: active) {
|
|
1575
|
+
[data-hl-menu] [role^='menuitem'][aria-expanded='true'] {
|
|
1576
|
+
background: Highlight;
|
|
1577
|
+
color: HighlightText;
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
[data-hl-menu] [role^='menuitem']:is(:disabled, [aria-disabled='true']) {
|
|
1581
|
+
color: GrayText;
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
[data-hl-menu] [role='separator'] {
|
|
1585
|
+
background: CanvasText;
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1357
1588
|
}
|
|
1358
1589
|
|
|
1590
|
+
/**
|
|
1591
|
+
* Toast: a `[data-hl-toast-region]` live region fixed to the end corner of the
|
|
1592
|
+
* viewport, holding `[data-hl-toast]` notifications with an optional
|
|
1593
|
+
* `[data-hl-toast-close]` button.
|
|
1594
|
+
*
|
|
1595
|
+
* Toasts are inherently script-driven; with no JavaScript the region is simply
|
|
1596
|
+
* empty. The enhancer creates the toasts and reads:
|
|
1597
|
+
* data-hl-toast-region: the container
|
|
1598
|
+
* data-hl-toast: one notification (created by the enhancer)
|
|
1599
|
+
* data-hl-intent: info (default) | success | warning | danger, on a toast
|
|
1600
|
+
* data-hl-toast-close: dismiss button inside a toast
|
|
1601
|
+
* data-hl-toast-trigger, data-hl-toast-intent, data-hl-toast-duration:
|
|
1602
|
+
* declarative trigger buttons anywhere in the page
|
|
1603
|
+
*/
|
|
1604
|
+
|
|
1359
1605
|
@layer components {
|
|
1360
1606
|
[data-hl-toast-region] {
|
|
1361
1607
|
position: fixed;
|
|
1362
|
-
z-index: 1500;
|
|
1363
1608
|
z-index: var(--hl-z-toast);
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
right: 1rem;
|
|
1367
|
-
right: var(--hl-space-4);
|
|
1609
|
+
inset-block-end: var(--hl-space-4);
|
|
1610
|
+
inset-inline-end: var(--hl-space-4);
|
|
1368
1611
|
display: flex;
|
|
1369
1612
|
flex-direction: column-reverse;
|
|
1370
|
-
gap: 0.5rem;
|
|
1371
1613
|
gap: var(--hl-space-2);
|
|
1372
1614
|
pointer-events: none;
|
|
1373
|
-
max-
|
|
1615
|
+
max-inline-size: min(90vi, 24rem);
|
|
1374
1616
|
}
|
|
1375
1617
|
|
|
1376
1618
|
[data-hl-toast] {
|
|
1377
1619
|
pointer-events: auto;
|
|
1378
1620
|
display: flex;
|
|
1379
1621
|
align-items: flex-start;
|
|
1380
|
-
gap: 0.75rem;
|
|
1381
1622
|
gap: var(--hl-space-3);
|
|
1382
|
-
border:
|
|
1383
|
-
border: 1px solid var(--hl-border);
|
|
1384
|
-
border-radius: 0.5rem;
|
|
1623
|
+
border: var(--hl-border-width) solid var(--hl-border);
|
|
1385
1624
|
border-radius: var(--hl-radius-lg);
|
|
1386
|
-
padding: 0.75rem 1rem;
|
|
1387
1625
|
padding: var(--hl-space-3) var(--hl-space-4);
|
|
1388
|
-
background: hsl(0, 0%, 100%);
|
|
1389
1626
|
background: var(--hl-surface);
|
|
1390
|
-
box-shadow: 0 10px 15px -3px hsla(222, 47%, 11%, 0.1), 0 4px 6px -4px hsla(222, 47%, 11%, 0.1);
|
|
1391
1627
|
box-shadow: var(--hl-overlay-shadow);
|
|
1392
|
-
|
|
1393
|
-
|
|
1628
|
+
transition:
|
|
1629
|
+
opacity var(--hl-duration-base) var(--hl-ease-standard),
|
|
1630
|
+
translate var(--hl-duration-base) var(--hl-ease-standard);
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
/* Toasts are inserted by script, so the entry runs from @starting-style. */
|
|
1634
|
+
@starting-style {
|
|
1635
|
+
[data-hl-toast] {
|
|
1636
|
+
opacity: 0;
|
|
1637
|
+
translate: 0 var(--hl-space-2);
|
|
1638
|
+
}
|
|
1394
1639
|
}
|
|
1395
1640
|
|
|
1396
|
-
[data-hl-toast][data-hl-
|
|
1397
|
-
border-
|
|
1398
|
-
border-left: 3px solid hsl(142deg 76% 36%);
|
|
1399
|
-
border-left: 3px solid var(--hl-success);
|
|
1641
|
+
[data-hl-toast][data-hl-intent='success'] {
|
|
1642
|
+
border-inline-start: 3px solid var(--hl-success);
|
|
1400
1643
|
}
|
|
1401
1644
|
|
|
1402
|
-
[data-hl-toast][data-hl-
|
|
1403
|
-
border-
|
|
1404
|
-
border-left: 3px solid hsl(38deg 92% 50%);
|
|
1405
|
-
border-left: 3px solid var(--hl-warning);
|
|
1645
|
+
[data-hl-toast][data-hl-intent='warning'] {
|
|
1646
|
+
border-inline-start: 3px solid var(--hl-warning);
|
|
1406
1647
|
}
|
|
1407
1648
|
|
|
1408
|
-
[data-hl-toast][data-hl-
|
|
1409
|
-
border-
|
|
1410
|
-
border-left: 3px solid hsl(0deg 72% 51%);
|
|
1411
|
-
border-left: 3px solid var(--hl-danger);
|
|
1649
|
+
[data-hl-toast][data-hl-intent='danger'] {
|
|
1650
|
+
border-inline-start: 3px solid var(--hl-danger);
|
|
1412
1651
|
}
|
|
1413
1652
|
|
|
1414
|
-
[data-hl-toast][data-hl-
|
|
1415
|
-
border-
|
|
1416
|
-
border-left: 3px solid hsl(200deg 98% 39%);
|
|
1417
|
-
border-left: 3px solid var(--hl-info);
|
|
1653
|
+
[data-hl-toast][data-hl-intent='info'] {
|
|
1654
|
+
border-inline-start: 3px solid var(--hl-info);
|
|
1418
1655
|
}
|
|
1419
1656
|
|
|
1420
1657
|
[data-hl-toast-close] {
|
|
1421
|
-
|
|
1422
|
-
-moz-appearance: none;
|
|
1423
|
-
appearance: none;
|
|
1658
|
+
appearance: none;
|
|
1424
1659
|
border: none;
|
|
1425
1660
|
background: transparent;
|
|
1426
1661
|
cursor: pointer;
|
|
1427
|
-
padding: 0.25rem;
|
|
1428
1662
|
padding: var(--hl-space-1);
|
|
1429
|
-
color: hsl(215, 19%, 35%);
|
|
1430
1663
|
color: var(--hl-fg-muted);
|
|
1431
|
-
margin-
|
|
1664
|
+
margin-inline-start: auto;
|
|
1432
1665
|
flex-shrink: 0;
|
|
1433
1666
|
font: inherit;
|
|
1434
1667
|
}
|
|
1435
1668
|
|
|
1436
1669
|
[data-hl-toast-close]:hover {
|
|
1437
|
-
color: hsl(222, 47%, 11%);
|
|
1438
1670
|
color: var(--hl-fg);
|
|
1439
1671
|
}
|
|
1440
1672
|
|
|
1441
1673
|
[data-hl-toast-close]:focus-visible {
|
|
1442
|
-
outline: 2px solid hsl(217, 91%, 60%);
|
|
1443
1674
|
outline: var(--hl-focus-ring);
|
|
1444
|
-
outline-offset:
|
|
1445
|
-
border-radius: 0.25rem;
|
|
1675
|
+
outline-offset: var(--hl-focus-offset);
|
|
1446
1676
|
border-radius: var(--hl-radius-sm);
|
|
1447
1677
|
}
|
|
1448
|
-
|
|
1449
|
-
@keyframes hl-toast-in {
|
|
1450
|
-
from {
|
|
1451
|
-
opacity: 0;
|
|
1452
|
-
transform: translateY(0.5rem);
|
|
1453
|
-
}
|
|
1454
|
-
|
|
1455
|
-
to {
|
|
1456
|
-
opacity: 1;
|
|
1457
|
-
transform: translateY(0);
|
|
1458
|
-
}
|
|
1459
|
-
}
|
|
1460
|
-
|
|
1461
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1462
|
-
[data-hl-toast] {
|
|
1463
|
-
animation: none;
|
|
1464
|
-
}
|
|
1465
|
-
}
|
|
1466
1678
|
}
|
|
1467
1679
|
|
|
1468
1680
|
/**
|
|
1469
1681
|
* Command palette: `<div data-hl-command>` containing a search input
|
|
1470
|
-
* (
|
|
1471
|
-
* `[data-hl-command-
|
|
1472
|
-
* Often placed inside a `<dialog class="hl-modal">`.
|
|
1682
|
+
* (`.hl-command-input` or `[data-hl-command-input]`), an empty state
|
|
1683
|
+
* (`[data-hl-command-empty]`), and a `[data-hl-command-list] role="listbox"` of
|
|
1684
|
+
* grouped `[role="option"]` items. Often placed inside a `<dialog class="hl-modal">`.
|
|
1685
|
+
*
|
|
1686
|
+
* No-JS baseline: every item is listed and the empty state stays hidden,
|
|
1687
|
+
* since nothing can filter yet. The enhancer marks the root `data-hl-ready`
|
|
1688
|
+
* and then toggles `hidden` on items, groups, and the empty state.
|
|
1689
|
+
* data-hl-command: root
|
|
1690
|
+
* data-hl-command-input: filter field
|
|
1691
|
+
* data-hl-command-list: listbox
|
|
1692
|
+
* data-hl-command-group: a group wrapper (hidden when all its items are)
|
|
1693
|
+
* data-hl-command-empty: "no results" message
|
|
1694
|
+
* data-hl-ready: set by the enhancer
|
|
1473
1695
|
*/
|
|
1474
1696
|
|
|
1475
1697
|
@layer components {
|
|
1476
1698
|
[data-hl-command] {
|
|
1477
1699
|
display: flex;
|
|
1478
1700
|
flex-direction: column;
|
|
1479
|
-
min-
|
|
1701
|
+
min-block-size: 0;
|
|
1480
1702
|
overflow: hidden;
|
|
1481
|
-
background: hsl(0, 0%, 100%);
|
|
1482
1703
|
background: var(--hl-overlay);
|
|
1483
|
-
border-radius: 0.5rem;
|
|
1484
1704
|
border-radius: var(--hl-radius-lg);
|
|
1485
1705
|
}
|
|
1486
1706
|
|
|
1487
|
-
[data-hl-command-input] {
|
|
1707
|
+
:is(.hl-command-input, [data-hl-command-input]) {
|
|
1488
1708
|
flex: none;
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
padding-left: 1rem;
|
|
1493
|
-
padding-right: 1rem;
|
|
1494
|
-
padding-left: var(--hl-space-4);
|
|
1495
|
-
padding-right: var(--hl-space-4);
|
|
1709
|
+
inline-size: 100%;
|
|
1710
|
+
block-size: var(--hl-control-height-lg);
|
|
1711
|
+
padding-inline: var(--hl-space-4);
|
|
1496
1712
|
border: 0;
|
|
1497
|
-
border-
|
|
1498
|
-
border-bottom: 1px solid hsl(214deg 32% 91%);
|
|
1499
|
-
border-bottom: var(--hl-border-width) solid var(--hl-border);
|
|
1713
|
+
border-block-end: var(--hl-border-width) solid var(--hl-border);
|
|
1500
1714
|
border-radius: 0;
|
|
1501
1715
|
background: transparent;
|
|
1502
|
-
color: hsl(222, 47%, 11%);
|
|
1503
1716
|
color: var(--hl-fg);
|
|
1504
1717
|
font: inherit;
|
|
1505
|
-
font-size: 1rem;
|
|
1506
1718
|
font-size: var(--hl-text-base);
|
|
1507
1719
|
}
|
|
1508
1720
|
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
[data-hl-command-input]::-moz-placeholder {
|
|
1514
|
-
color: hsl(215, 16%, 47%);
|
|
1515
|
-
color: var(--hl-fg-subtle);
|
|
1721
|
+
/* The field is flush with the palette edge, so the ring is drawn inward. */
|
|
1722
|
+
:is(.hl-command-input, [data-hl-command-input]):focus-visible {
|
|
1723
|
+
outline: var(--hl-focus-ring);
|
|
1724
|
+
outline-offset: calc(var(--hl-focus-offset) * -1);
|
|
1516
1725
|
}
|
|
1517
1726
|
|
|
1518
|
-
[data-hl-command-input]::placeholder {
|
|
1519
|
-
color: hsl(215, 16%, 47%);
|
|
1727
|
+
:is(.hl-command-input, [data-hl-command-input])::placeholder {
|
|
1520
1728
|
color: var(--hl-fg-subtle);
|
|
1521
1729
|
}
|
|
1522
1730
|
|
|
1523
1731
|
[data-hl-command-list] {
|
|
1524
1732
|
flex: 1 1 auto;
|
|
1525
|
-
max-
|
|
1733
|
+
max-block-size: 24rem;
|
|
1526
1734
|
overflow-y: auto;
|
|
1527
|
-
padding: 0.5rem;
|
|
1528
1735
|
padding: var(--hl-space-2);
|
|
1529
1736
|
}
|
|
1530
1737
|
|
|
@@ -1533,30 +1740,21 @@
|
|
|
1533
1740
|
}
|
|
1534
1741
|
|
|
1535
1742
|
.hl-command-group-label {
|
|
1536
|
-
padding: 0.5rem 0.5rem 0.25rem;
|
|
1537
1743
|
padding: var(--hl-space-2) var(--hl-space-2) var(--hl-space-1);
|
|
1538
|
-
font-size: 0.75rem;
|
|
1539
1744
|
font-size: var(--hl-text-xs);
|
|
1540
|
-
font-weight: 600;
|
|
1541
1745
|
font-weight: var(--hl-font-semibold);
|
|
1542
1746
|
text-transform: uppercase;
|
|
1543
1747
|
letter-spacing: 0.04em;
|
|
1544
|
-
color: hsl(215, 16%, 47%);
|
|
1545
1748
|
color: var(--hl-fg-subtle);
|
|
1546
1749
|
}
|
|
1547
1750
|
|
|
1548
1751
|
[data-hl-command] [role='option'] {
|
|
1549
1752
|
display: flex;
|
|
1550
1753
|
align-items: center;
|
|
1551
|
-
gap: 0.75rem;
|
|
1552
1754
|
gap: var(--hl-space-3);
|
|
1553
|
-
padding: 0.5rem 0.75rem;
|
|
1554
1755
|
padding: var(--hl-space-2) var(--hl-space-3);
|
|
1555
|
-
border-radius: 0.375rem;
|
|
1556
1756
|
border-radius: var(--hl-radius-md);
|
|
1557
|
-
font-size: 0.875rem;
|
|
1558
1757
|
font-size: var(--hl-text-sm);
|
|
1559
|
-
color: hsl(222, 47%, 11%);
|
|
1560
1758
|
color: var(--hl-fg);
|
|
1561
1759
|
cursor: pointer;
|
|
1562
1760
|
}
|
|
@@ -1567,48 +1765,59 @@
|
|
|
1567
1765
|
|
|
1568
1766
|
[data-hl-command] [role='option']:hover,
|
|
1569
1767
|
[data-hl-command] [role='option'][aria-selected='true'] {
|
|
1570
|
-
background: hsl(214, 100%, 97%);
|
|
1571
1768
|
background: var(--hl-primary-subtle);
|
|
1572
|
-
color: hsl(224, 76%, 48%);
|
|
1573
1769
|
color: var(--hl-primary-subtle-fg);
|
|
1574
1770
|
}
|
|
1575
1771
|
|
|
1772
|
+
[data-hl-command] [role='option'][aria-disabled='true'] {
|
|
1773
|
+
opacity: var(--hl-disabled-opacity);
|
|
1774
|
+
pointer-events: none;
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1576
1777
|
[data-hl-command] [role='option'] svg {
|
|
1577
|
-
|
|
1578
|
-
|
|
1778
|
+
inline-size: 1.1em;
|
|
1779
|
+
block-size: 1.1em;
|
|
1579
1780
|
flex: none;
|
|
1580
1781
|
opacity: 0.7;
|
|
1581
1782
|
}
|
|
1582
1783
|
|
|
1583
1784
|
[data-hl-command-empty] {
|
|
1584
|
-
padding: 2rem 1rem;
|
|
1585
1785
|
padding: var(--hl-space-8) var(--hl-space-4);
|
|
1586
1786
|
text-align: center;
|
|
1587
|
-
font-size: 0.875rem;
|
|
1588
1787
|
font-size: var(--hl-text-sm);
|
|
1589
|
-
color: hsl(215, 19%, 35%);
|
|
1590
1788
|
color: var(--hl-fg-muted);
|
|
1591
1789
|
}
|
|
1592
1790
|
|
|
1593
|
-
|
|
1791
|
+
/* No-JS baseline: there is no filtering, so there are never "no results". */
|
|
1792
|
+
[data-hl-command-empty][hidden],
|
|
1793
|
+
[data-hl-command]:not([data-hl-ready]) [data-hl-command-empty] {
|
|
1594
1794
|
display: none;
|
|
1595
1795
|
}
|
|
1796
|
+
|
|
1797
|
+
@media (forced-colors: active) {
|
|
1798
|
+
[data-hl-command] [role='option'][aria-selected='true'] {
|
|
1799
|
+
background: Highlight;
|
|
1800
|
+
color: HighlightText;
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1596
1803
|
}
|
|
1597
1804
|
|
|
1598
1805
|
/* Forms */
|
|
1599
1806
|
|
|
1600
1807
|
/**
|
|
1601
|
-
* Button: `<button class="hl-button">` (works on `<a>`/`<input>` too).
|
|
1808
|
+
* Button: `<button class="hl-button">` (works on `<a>`/`<input>` too). Pure
|
|
1809
|
+
* CSS; there is no enhancer.
|
|
1602
1810
|
*
|
|
1603
1811
|
* Color is driven by a small set of local custom properties so the
|
|
1604
|
-
* intent
|
|
1812
|
+
* intent by variant matrix stays DRY: `data-hl-intent` swaps the accent set,
|
|
1605
1813
|
* `data-hl-variant` decides how those values are applied.
|
|
1606
1814
|
*
|
|
1607
1815
|
* data-hl-variant: solid (default) | soft | outline | ghost | link
|
|
1608
1816
|
* data-hl-intent: neutral (default) | primary | danger | success | warning | info
|
|
1609
1817
|
* data-hl-size: sm | md (default) | lg
|
|
1610
|
-
* data-hl-block: stretch to container
|
|
1818
|
+
* data-hl-block: stretch to the container's inline size
|
|
1611
1819
|
* data-hl-icon: square, icon-only
|
|
1820
|
+
* data-hl-loading: shows a spinner and blocks interaction
|
|
1612
1821
|
*/
|
|
1613
1822
|
|
|
1614
1823
|
@layer components {
|
|
@@ -1628,39 +1837,27 @@
|
|
|
1628
1837
|
display: inline-flex;
|
|
1629
1838
|
align-items: center;
|
|
1630
1839
|
justify-content: center;
|
|
1631
|
-
gap: 0.5rem;
|
|
1632
1840
|
gap: var(--_gap);
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
padding-left: 1rem;
|
|
1636
|
-
padding-right: 1rem;
|
|
1637
|
-
padding-left: var(--_pad-x);
|
|
1638
|
-
padding-right: var(--_pad-x);
|
|
1639
|
-
border: 1px solid transparent;
|
|
1841
|
+
block-size: var(--_height);
|
|
1842
|
+
padding-inline: var(--_pad-x);
|
|
1640
1843
|
border: var(--hl-border-width) solid transparent;
|
|
1641
|
-
border-radius: 0.375rem;
|
|
1642
1844
|
border-radius: var(--hl-radius-md);
|
|
1643
1845
|
font-family: inherit;
|
|
1644
|
-
font-size: 0.875rem;
|
|
1645
1846
|
font-size: var(--_font);
|
|
1646
|
-
font-weight: 500;
|
|
1647
1847
|
font-weight: var(--hl-font-medium);
|
|
1648
1848
|
line-height: 1;
|
|
1649
1849
|
white-space: nowrap;
|
|
1650
|
-
-webkit-text-decoration: none;
|
|
1651
1850
|
text-decoration: none;
|
|
1652
1851
|
cursor: pointer;
|
|
1653
1852
|
-webkit-user-select: none;
|
|
1654
|
-
-moz-user-select: none;
|
|
1655
1853
|
user-select: none;
|
|
1656
|
-
background: hsl(210, 40%, 96%);
|
|
1657
1854
|
background: var(--_solid-bg);
|
|
1658
|
-
color: hsl(222, 47%, 11%);
|
|
1659
1855
|
color: var(--_solid-fg);
|
|
1660
1856
|
transition:
|
|
1661
|
-
background-color
|
|
1662
|
-
|
|
1663
|
-
|
|
1857
|
+
background-color var(--hl-duration-fast) var(--hl-ease-standard),
|
|
1858
|
+
border-color var(--hl-duration-fast) var(--hl-ease-standard),
|
|
1859
|
+
color var(--hl-duration-fast) var(--hl-ease-standard),
|
|
1860
|
+
box-shadow var(--hl-duration-fast) var(--hl-ease-standard);
|
|
1664
1861
|
}
|
|
1665
1862
|
|
|
1666
1863
|
.hl-button:hover {
|
|
@@ -1672,16 +1869,15 @@
|
|
|
1672
1869
|
}
|
|
1673
1870
|
|
|
1674
1871
|
.hl-button:focus-visible {
|
|
1675
|
-
outline: 2px solid hsl(217, 91%, 60%);
|
|
1676
1872
|
outline: var(--hl-focus-ring);
|
|
1677
|
-
outline-offset:
|
|
1873
|
+
outline-offset: var(--hl-focus-offset);
|
|
1678
1874
|
}
|
|
1679
1875
|
|
|
1680
1876
|
.hl-button:disabled,
|
|
1681
1877
|
.hl-button[aria-disabled='true'],
|
|
1682
1878
|
.hl-button[data-hl-loading] {
|
|
1683
1879
|
cursor: not-allowed;
|
|
1684
|
-
opacity:
|
|
1880
|
+
opacity: var(--hl-disabled-opacity);
|
|
1685
1881
|
}
|
|
1686
1882
|
|
|
1687
1883
|
.hl-button[data-hl-loading] {
|
|
@@ -1750,7 +1946,6 @@
|
|
|
1750
1946
|
.hl-button[data-hl-variant='outline'] {
|
|
1751
1947
|
background: transparent;
|
|
1752
1948
|
color: var(--_accent);
|
|
1753
|
-
border-color: hsl(213, 27%, 84%);
|
|
1754
1949
|
border-color: var(--hl-border-strong);
|
|
1755
1950
|
}
|
|
1756
1951
|
|
|
@@ -1769,12 +1964,11 @@
|
|
|
1769
1964
|
}
|
|
1770
1965
|
|
|
1771
1966
|
.hl-button[data-hl-variant='link'] {
|
|
1772
|
-
|
|
1967
|
+
block-size: auto;
|
|
1773
1968
|
padding: 0;
|
|
1774
1969
|
background: transparent;
|
|
1775
1970
|
color: var(--_accent);
|
|
1776
1971
|
border-color: transparent;
|
|
1777
|
-
-webkit-text-decoration: underline;
|
|
1778
1972
|
text-decoration: underline;
|
|
1779
1973
|
text-underline-offset: 0.2em;
|
|
1780
1974
|
}
|
|
@@ -1790,8 +1984,6 @@
|
|
|
1790
1984
|
--_font: var(--hl-text-xs);
|
|
1791
1985
|
--_gap: var(--hl-space-1);
|
|
1792
1986
|
|
|
1793
|
-
border-radius: 0.25rem;
|
|
1794
|
-
|
|
1795
1987
|
border-radius: var(--hl-radius-sm);
|
|
1796
1988
|
}
|
|
1797
1989
|
|
|
@@ -1800,42 +1992,39 @@
|
|
|
1800
1992
|
--_pad-x: var(--hl-space-5);
|
|
1801
1993
|
--_font: var(--hl-text-base);
|
|
1802
1994
|
|
|
1803
|
-
border-radius: 0.5rem;
|
|
1804
|
-
|
|
1805
1995
|
border-radius: var(--hl-radius-lg);
|
|
1806
1996
|
}
|
|
1807
1997
|
|
|
1808
1998
|
.hl-button[data-hl-block] {
|
|
1809
1999
|
display: flex;
|
|
1810
|
-
|
|
2000
|
+
inline-size: 100%;
|
|
1811
2001
|
}
|
|
1812
2002
|
|
|
1813
2003
|
.hl-button[data-hl-icon] {
|
|
1814
|
-
|
|
1815
|
-
padding-
|
|
1816
|
-
padding-right: 0;
|
|
2004
|
+
inline-size: var(--_height);
|
|
2005
|
+
padding-inline: 0;
|
|
1817
2006
|
}
|
|
1818
2007
|
|
|
1819
2008
|
.hl-button > svg {
|
|
1820
|
-
|
|
1821
|
-
|
|
2009
|
+
inline-size: 1.1em;
|
|
2010
|
+
block-size: 1.1em;
|
|
1822
2011
|
flex: none;
|
|
1823
2012
|
}
|
|
1824
2013
|
|
|
1825
2014
|
.hl-button[data-hl-loading]::before {
|
|
1826
2015
|
content: '';
|
|
1827
|
-
|
|
1828
|
-
|
|
2016
|
+
inline-size: 1em;
|
|
2017
|
+
block-size: 1em;
|
|
1829
2018
|
border: 2px solid currentcolor;
|
|
1830
|
-
border-
|
|
1831
|
-
border-radius: 9999px;
|
|
2019
|
+
border-block-start-color: transparent;
|
|
1832
2020
|
border-radius: var(--hl-radius-full);
|
|
1833
2021
|
animation: hl-button-spin 0.6s linear infinite;
|
|
1834
2022
|
}
|
|
1835
2023
|
|
|
2024
|
+
/* A static arc still reads as "busy" without continuous motion. */
|
|
1836
2025
|
@media (prefers-reduced-motion: reduce) {
|
|
1837
2026
|
.hl-button[data-hl-loading]::before {
|
|
1838
|
-
animation
|
|
2027
|
+
animation: none;
|
|
1839
2028
|
}
|
|
1840
2029
|
}
|
|
1841
2030
|
|
|
@@ -1854,32 +2043,46 @@
|
|
|
1854
2043
|
}
|
|
1855
2044
|
|
|
1856
2045
|
.hl-button-group > .hl-button:not(:first-child) {
|
|
1857
|
-
margin-
|
|
1858
|
-
margin-left: calc(var(--hl-border-width) * -1);
|
|
2046
|
+
margin-inline-start: calc(var(--hl-border-width) * -1);
|
|
1859
2047
|
}
|
|
1860
2048
|
|
|
1861
2049
|
.hl-button-group > .hl-button:first-child {
|
|
1862
|
-
border-
|
|
1863
|
-
border-
|
|
1864
|
-
border-bottom-left-radius: 0.375rem;
|
|
1865
|
-
border-bottom-left-radius: var(--hl-radius-md);
|
|
2050
|
+
border-start-start-radius: var(--hl-radius-md);
|
|
2051
|
+
border-end-start-radius: var(--hl-radius-md);
|
|
1866
2052
|
}
|
|
1867
2053
|
|
|
1868
2054
|
.hl-button-group > .hl-button:last-child {
|
|
1869
|
-
border-
|
|
1870
|
-
border-
|
|
1871
|
-
border-bottom-right-radius: 0.375rem;
|
|
1872
|
-
border-bottom-right-radius: var(--hl-radius-md);
|
|
2055
|
+
border-start-end-radius: var(--hl-radius-md);
|
|
2056
|
+
border-end-end-radius: var(--hl-radius-md);
|
|
1873
2057
|
}
|
|
1874
2058
|
|
|
1875
2059
|
.hl-button-group > .hl-button:hover,
|
|
1876
2060
|
.hl-button-group > .hl-button:focus-visible {
|
|
1877
2061
|
z-index: 1;
|
|
1878
2062
|
}
|
|
2063
|
+
|
|
2064
|
+
/* Forced colors flatten every fill to Canvas, so the border alone tells a
|
|
2065
|
+
button apart from text; the link variant keeps reading as a link. */
|
|
2066
|
+
@media (forced-colors: active) {
|
|
2067
|
+
.hl-button {
|
|
2068
|
+
border-color: ButtonBorder;
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
.hl-button[data-hl-variant='link'] {
|
|
2072
|
+
border-color: transparent;
|
|
2073
|
+
color: LinkText;
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
.hl-button:disabled,
|
|
2077
|
+
.hl-button[aria-disabled='true'] {
|
|
2078
|
+
color: GrayText;
|
|
2079
|
+
border-color: GrayText;
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
1879
2082
|
}
|
|
1880
2083
|
|
|
1881
2084
|
/**
|
|
1882
|
-
* Text input: `<input class="hl-input">`.
|
|
2085
|
+
* Text input: `<input class="hl-input">`. Pure CSS; there is no enhancer.
|
|
1883
2086
|
* data-hl-size: sm | md (default) | lg
|
|
1884
2087
|
* data-hl-invalid: error styling (pair with aria-invalid)
|
|
1885
2088
|
*/
|
|
@@ -1891,93 +2094,56 @@
|
|
|
1891
2094
|
--_font: var(--hl-text-sm);
|
|
1892
2095
|
|
|
1893
2096
|
display: block;
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
padding-left: 0.75rem;
|
|
1898
|
-
padding-right: 0.75rem;
|
|
1899
|
-
padding-left: var(--_pad-x);
|
|
1900
|
-
padding-right: var(--_pad-x);
|
|
1901
|
-
border: 1px solid hsl(213, 27%, 84%);
|
|
2097
|
+
inline-size: 100%;
|
|
2098
|
+
block-size: var(--_height);
|
|
2099
|
+
padding-inline: var(--_pad-x);
|
|
1902
2100
|
border: var(--hl-border-width) solid var(--hl-border-strong);
|
|
1903
|
-
border-radius: 0.375rem;
|
|
1904
2101
|
border-radius: var(--hl-radius-md);
|
|
1905
|
-
background: hsl(0, 0%, 100%);
|
|
1906
2102
|
background: var(--hl-surface);
|
|
1907
|
-
color: hsl(222, 47%, 11%);
|
|
1908
2103
|
color: var(--hl-fg);
|
|
1909
2104
|
font-family: inherit;
|
|
1910
|
-
font-size: 0.875rem;
|
|
1911
2105
|
font-size: var(--_font);
|
|
1912
|
-
line-height: 1.5;
|
|
1913
2106
|
line-height: var(--hl-leading-normal);
|
|
1914
2107
|
transition:
|
|
1915
|
-
border-color
|
|
1916
|
-
|
|
1917
|
-
border-color var(--hl-duration-fast) var(--hl-ease-standard), box-shadow var(--hl-duration-fast) var(--hl-ease-standard);
|
|
1918
|
-
}
|
|
1919
|
-
|
|
1920
|
-
.hl-input::-moz-placeholder {
|
|
1921
|
-
color: hsl(215, 16%, 47%);
|
|
1922
|
-
color: var(--hl-fg-subtle);
|
|
2108
|
+
border-color var(--hl-duration-fast) var(--hl-ease-standard),
|
|
2109
|
+
box-shadow var(--hl-duration-fast) var(--hl-ease-standard);
|
|
1923
2110
|
}
|
|
1924
2111
|
|
|
1925
2112
|
.hl-input::placeholder {
|
|
1926
|
-
color: hsl(215, 16%, 47%);
|
|
1927
2113
|
color: var(--hl-fg-subtle);
|
|
1928
2114
|
}
|
|
1929
2115
|
|
|
1930
|
-
.hl-input:hover:not(:disabled
|
|
1931
|
-
border-color: hsl(215, 16%, 47%);
|
|
2116
|
+
.hl-input:hover:not(:disabled, :focus) {
|
|
1932
2117
|
border-color: var(--hl-fg-subtle);
|
|
1933
2118
|
}
|
|
1934
2119
|
|
|
1935
2120
|
.hl-input:focus-visible {
|
|
1936
2121
|
outline: none;
|
|
1937
|
-
border-color: hsl(217, 91%, 60%);
|
|
1938
2122
|
border-color: var(--hl-ring);
|
|
1939
|
-
box-shadow:
|
|
1940
|
-
}
|
|
1941
|
-
|
|
1942
|
-
@supports (color: color-mix(in lch, red, blue)){
|
|
1943
|
-
.hl-input:focus-visible {
|
|
1944
|
-
box-shadow: 0 0 0 3px color-mix(in oklab, var(--hl-ring) 30%, transparent);
|
|
2123
|
+
box-shadow: var(--hl-focus-shadow);
|
|
1945
2124
|
}
|
|
1946
|
-
}
|
|
1947
2125
|
|
|
1948
2126
|
.hl-input:disabled {
|
|
1949
2127
|
cursor: not-allowed;
|
|
1950
|
-
opacity:
|
|
1951
|
-
background: hsl(210, 40%, 96%);
|
|
2128
|
+
opacity: var(--hl-disabled-opacity);
|
|
1952
2129
|
background: var(--hl-surface-2);
|
|
1953
2130
|
}
|
|
1954
2131
|
|
|
1955
2132
|
.hl-input[data-hl-invalid],
|
|
1956
2133
|
.hl-input[aria-invalid='true'] {
|
|
1957
|
-
border-color: hsl(0, 72%, 51%);
|
|
1958
2134
|
border-color: var(--hl-danger);
|
|
1959
2135
|
}
|
|
1960
2136
|
|
|
1961
2137
|
.hl-input[data-hl-invalid]:focus-visible,
|
|
1962
2138
|
.hl-input[aria-invalid='true']:focus-visible {
|
|
1963
|
-
border-color: hsl(0, 72%, 51%);
|
|
1964
2139
|
border-color: var(--hl-danger);
|
|
1965
|
-
box-shadow: 0 0 0 3px rgba(220, 40, 40, 0.3);
|
|
1966
|
-
}
|
|
1967
|
-
|
|
1968
|
-
@supports (color: color-mix(in lch, red, blue)){
|
|
1969
|
-
.hl-input[data-hl-invalid]:focus-visible,
|
|
1970
|
-
.hl-input[aria-invalid='true']:focus-visible {
|
|
1971
2140
|
box-shadow: 0 0 0 3px color-mix(in oklab, var(--hl-danger) 30%, transparent);
|
|
1972
2141
|
}
|
|
1973
|
-
}
|
|
1974
2142
|
|
|
1975
2143
|
.hl-input[data-hl-size='sm'] {
|
|
1976
2144
|
--_height: var(--hl-control-height-sm);
|
|
1977
2145
|
--_font: var(--hl-text-xs);
|
|
1978
2146
|
|
|
1979
|
-
border-radius: 0.25rem;
|
|
1980
|
-
|
|
1981
2147
|
border-radius: var(--hl-radius-sm);
|
|
1982
2148
|
}
|
|
1983
2149
|
|
|
@@ -1988,113 +2154,101 @@
|
|
|
1988
2154
|
}
|
|
1989
2155
|
|
|
1990
2156
|
.hl-input[type='file'] {
|
|
1991
|
-
|
|
1992
|
-
padding-
|
|
1993
|
-
padding-bottom: 0.5rem;
|
|
1994
|
-
padding-top: var(--hl-space-2);
|
|
1995
|
-
padding-bottom: var(--hl-space-2);
|
|
2157
|
+
block-size: auto;
|
|
2158
|
+
padding-block: var(--hl-space-2);
|
|
1996
2159
|
}
|
|
1997
2160
|
|
|
1998
2161
|
.hl-input[type='color'] {
|
|
1999
|
-
|
|
2000
|
-
padding: 0.25rem;
|
|
2162
|
+
inline-size: var(--_height);
|
|
2001
2163
|
padding: var(--hl-space-1);
|
|
2002
2164
|
}
|
|
2165
|
+
|
|
2166
|
+
/* Box shadows are dropped in forced colors, so focus falls back to an outline. */
|
|
2167
|
+
@media (forced-colors: active) {
|
|
2168
|
+
.hl-input:focus-visible {
|
|
2169
|
+
outline: var(--hl-focus-ring);
|
|
2170
|
+
outline-offset: var(--hl-focus-offset);
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2003
2173
|
}
|
|
2004
2174
|
|
|
2005
2175
|
/**
|
|
2006
|
-
* Multi-line text input: `<textarea class="hl-textarea">`.
|
|
2007
|
-
*
|
|
2176
|
+
* Multi-line text input: `<textarea class="hl-textarea">`. Pure CSS; there is
|
|
2177
|
+
* no enhancer.
|
|
2178
|
+
* data-hl-invalid: error styling (pair with aria-invalid)
|
|
2179
|
+
* data-hl-autosize: grows with its content where `field-sizing` is supported
|
|
2008
2180
|
*/
|
|
2009
2181
|
|
|
2010
2182
|
@layer components {
|
|
2011
2183
|
.hl-textarea {
|
|
2012
2184
|
display: block;
|
|
2013
|
-
|
|
2014
|
-
min-
|
|
2015
|
-
min-height: calc(var(--hl-control-height-md) * 2);
|
|
2016
|
-
padding: 0.5rem 0.75rem;
|
|
2185
|
+
inline-size: 100%;
|
|
2186
|
+
min-block-size: calc(var(--hl-control-height-md) * 2);
|
|
2017
2187
|
padding: var(--hl-space-2) var(--hl-space-3);
|
|
2018
|
-
border: 1px solid hsl(213, 27%, 84%);
|
|
2019
2188
|
border: var(--hl-border-width) solid var(--hl-border-strong);
|
|
2020
|
-
border-radius: 0.375rem;
|
|
2021
2189
|
border-radius: var(--hl-radius-md);
|
|
2022
|
-
background: hsl(0, 0%, 100%);
|
|
2023
2190
|
background: var(--hl-surface);
|
|
2024
|
-
color: hsl(222, 47%, 11%);
|
|
2025
2191
|
color: var(--hl-fg);
|
|
2026
2192
|
font-family: inherit;
|
|
2027
|
-
font-size: 0.875rem;
|
|
2028
2193
|
font-size: var(--hl-text-sm);
|
|
2029
|
-
line-height: 1.5;
|
|
2030
2194
|
line-height: var(--hl-leading-normal);
|
|
2031
2195
|
resize: vertical;
|
|
2032
2196
|
transition:
|
|
2033
|
-
border-color
|
|
2034
|
-
|
|
2035
|
-
border-color var(--hl-duration-fast) var(--hl-ease-standard), box-shadow var(--hl-duration-fast) var(--hl-ease-standard);
|
|
2036
|
-
}
|
|
2037
|
-
|
|
2038
|
-
.hl-textarea::-moz-placeholder {
|
|
2039
|
-
color: hsl(215, 16%, 47%);
|
|
2040
|
-
color: var(--hl-fg-subtle);
|
|
2197
|
+
border-color var(--hl-duration-fast) var(--hl-ease-standard),
|
|
2198
|
+
box-shadow var(--hl-duration-fast) var(--hl-ease-standard);
|
|
2041
2199
|
}
|
|
2042
2200
|
|
|
2043
2201
|
.hl-textarea::placeholder {
|
|
2044
|
-
color: hsl(215, 16%, 47%);
|
|
2045
2202
|
color: var(--hl-fg-subtle);
|
|
2046
2203
|
}
|
|
2047
2204
|
|
|
2048
|
-
.hl-textarea:hover:not(:disabled
|
|
2049
|
-
border-color: hsl(215, 16%, 47%);
|
|
2205
|
+
.hl-textarea:hover:not(:disabled, :focus) {
|
|
2050
2206
|
border-color: var(--hl-fg-subtle);
|
|
2051
2207
|
}
|
|
2052
2208
|
|
|
2053
2209
|
.hl-textarea:focus-visible {
|
|
2054
2210
|
outline: none;
|
|
2055
|
-
border-color: hsl(217, 91%, 60%);
|
|
2056
2211
|
border-color: var(--hl-ring);
|
|
2057
|
-
box-shadow:
|
|
2058
|
-
}
|
|
2059
|
-
|
|
2060
|
-
@supports (color: color-mix(in lch, red, blue)){
|
|
2061
|
-
.hl-textarea:focus-visible {
|
|
2062
|
-
box-shadow: 0 0 0 3px color-mix(in oklab, var(--hl-ring) 30%, transparent);
|
|
2212
|
+
box-shadow: var(--hl-focus-shadow);
|
|
2063
2213
|
}
|
|
2064
|
-
}
|
|
2065
2214
|
|
|
2066
2215
|
.hl-textarea:disabled {
|
|
2067
2216
|
cursor: not-allowed;
|
|
2068
|
-
opacity:
|
|
2069
|
-
background: hsl(210, 40%, 96%);
|
|
2217
|
+
opacity: var(--hl-disabled-opacity);
|
|
2070
2218
|
background: var(--hl-surface-2);
|
|
2071
2219
|
}
|
|
2072
2220
|
|
|
2073
2221
|
.hl-textarea[data-hl-invalid],
|
|
2074
2222
|
.hl-textarea[aria-invalid='true'] {
|
|
2075
|
-
border-color: hsl(0, 72%, 51%);
|
|
2076
2223
|
border-color: var(--hl-danger);
|
|
2077
2224
|
}
|
|
2078
2225
|
|
|
2079
2226
|
.hl-textarea[data-hl-invalid]:focus-visible,
|
|
2080
2227
|
.hl-textarea[aria-invalid='true']:focus-visible {
|
|
2081
|
-
border-color: hsl(0, 72%, 51%);
|
|
2082
2228
|
border-color: var(--hl-danger);
|
|
2083
|
-
box-shadow: 0 0 0 3px
|
|
2229
|
+
box-shadow: 0 0 0 3px color-mix(in oklab, var(--hl-danger) 30%, transparent);
|
|
2084
2230
|
}
|
|
2085
2231
|
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2232
|
+
/* Native autosize; engines without it keep the fixed minimum and a resizer. */
|
|
2233
|
+
@supports (field-sizing: content) {
|
|
2234
|
+
.hl-textarea[data-hl-autosize] {
|
|
2235
|
+
field-sizing: content;
|
|
2236
|
+
max-block-size: 60vb;
|
|
2237
|
+
}
|
|
2238
|
+
}
|
|
2239
|
+
|
|
2240
|
+
@media (forced-colors: active) {
|
|
2241
|
+
.hl-textarea:focus-visible {
|
|
2242
|
+
outline: var(--hl-focus-ring);
|
|
2243
|
+
outline-offset: var(--hl-focus-offset);
|
|
2244
|
+
}
|
|
2090
2245
|
}
|
|
2091
|
-
}
|
|
2092
2246
|
}
|
|
2093
2247
|
|
|
2094
2248
|
/**
|
|
2095
2249
|
* Native select: `<span class="hl-select-wrapper"><select class="hl-select">`.
|
|
2096
2250
|
* The wrapper draws a custom caret while the native control keeps full
|
|
2097
|
-
* keyboard
|
|
2251
|
+
* keyboard and mobile behavior. Pure CSS; there is no enhancer.
|
|
2098
2252
|
* data-hl-size: sm | md (default) | lg
|
|
2099
2253
|
* data-hl-invalid: error styling (pair with aria-invalid)
|
|
2100
2254
|
*/
|
|
@@ -2103,24 +2257,22 @@
|
|
|
2103
2257
|
.hl-select-wrapper {
|
|
2104
2258
|
position: relative;
|
|
2105
2259
|
display: inline-flex;
|
|
2106
|
-
|
|
2260
|
+
inline-size: 100%;
|
|
2107
2261
|
}
|
|
2108
2262
|
|
|
2263
|
+
/* The caret is a rotated square corner; it sits at the inline end so it
|
|
2264
|
+
moves to the left under RTL along with the select's end padding. */
|
|
2109
2265
|
.hl-select-wrapper::after {
|
|
2110
2266
|
content: '';
|
|
2111
2267
|
position: absolute;
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
border-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
border-bottom: 2px solid hsl(215, 19%, 35%);
|
|
2121
|
-
border-bottom: 2px solid hsl(215deg 19% 35%);
|
|
2122
|
-
border-bottom: 2px solid var(--hl-fg-muted);
|
|
2123
|
-
transform: translateY(-65%) rotate(45deg);
|
|
2268
|
+
inset-block-start: 50%;
|
|
2269
|
+
inset-inline-end: var(--hl-space-3);
|
|
2270
|
+
inline-size: 0.5rem;
|
|
2271
|
+
block-size: 0.5rem;
|
|
2272
|
+
border-inline-end: 2px solid var(--hl-fg-muted);
|
|
2273
|
+
border-block-end: 2px solid var(--hl-fg-muted);
|
|
2274
|
+
translate: 0 -65%;
|
|
2275
|
+
rotate: 45deg;
|
|
2124
2276
|
pointer-events: none;
|
|
2125
2277
|
}
|
|
2126
2278
|
|
|
@@ -2128,66 +2280,41 @@
|
|
|
2128
2280
|
--_height: var(--hl-control-height-md);
|
|
2129
2281
|
--_font: var(--hl-text-sm);
|
|
2130
2282
|
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
appearance: none;
|
|
2136
|
-
width: 100%;
|
|
2137
|
-
height: 2.5rem;
|
|
2138
|
-
height: var(--_height);
|
|
2139
|
-
padding-left: 0.75rem;
|
|
2140
|
-
padding-right: 2rem;
|
|
2141
|
-
padding-left: var(--hl-space-3);
|
|
2142
|
-
padding-right: var(--hl-space-8);
|
|
2143
|
-
border: 1px solid hsl(213, 27%, 84%);
|
|
2283
|
+
appearance: none;
|
|
2284
|
+
inline-size: 100%;
|
|
2285
|
+
block-size: var(--_height);
|
|
2286
|
+
padding-inline: var(--hl-space-3) var(--hl-space-8);
|
|
2144
2287
|
border: var(--hl-border-width) solid var(--hl-border-strong);
|
|
2145
|
-
border-radius: 0.375rem;
|
|
2146
2288
|
border-radius: var(--hl-radius-md);
|
|
2147
|
-
background: hsl(0, 0%, 100%);
|
|
2148
2289
|
background: var(--hl-surface);
|
|
2149
|
-
color: hsl(222, 47%, 11%);
|
|
2150
2290
|
color: var(--hl-fg);
|
|
2151
2291
|
font-family: inherit;
|
|
2152
|
-
font-size: 0.875rem;
|
|
2153
2292
|
font-size: var(--_font);
|
|
2154
|
-
line-height: 1.5;
|
|
2155
2293
|
line-height: var(--hl-leading-normal);
|
|
2156
2294
|
cursor: pointer;
|
|
2157
2295
|
transition:
|
|
2158
|
-
border-color
|
|
2159
|
-
|
|
2160
|
-
border-color var(--hl-duration-fast) var(--hl-ease-standard), box-shadow var(--hl-duration-fast) var(--hl-ease-standard);
|
|
2296
|
+
border-color var(--hl-duration-fast) var(--hl-ease-standard),
|
|
2297
|
+
box-shadow var(--hl-duration-fast) var(--hl-ease-standard);
|
|
2161
2298
|
}
|
|
2162
2299
|
|
|
2163
|
-
.hl-select:hover:not(:disabled
|
|
2164
|
-
border-color: hsl(215, 16%, 47%);
|
|
2300
|
+
.hl-select:hover:not(:disabled, :focus) {
|
|
2165
2301
|
border-color: var(--hl-fg-subtle);
|
|
2166
2302
|
}
|
|
2167
2303
|
|
|
2168
2304
|
.hl-select:focus-visible {
|
|
2169
2305
|
outline: none;
|
|
2170
|
-
border-color: hsl(217, 91%, 60%);
|
|
2171
2306
|
border-color: var(--hl-ring);
|
|
2172
|
-
box-shadow:
|
|
2173
|
-
}
|
|
2174
|
-
|
|
2175
|
-
@supports (color: color-mix(in lch, red, blue)){
|
|
2176
|
-
.hl-select:focus-visible {
|
|
2177
|
-
box-shadow: 0 0 0 3px color-mix(in oklab, var(--hl-ring) 30%, transparent);
|
|
2307
|
+
box-shadow: var(--hl-focus-shadow);
|
|
2178
2308
|
}
|
|
2179
|
-
}
|
|
2180
2309
|
|
|
2181
2310
|
.hl-select:disabled {
|
|
2182
2311
|
cursor: not-allowed;
|
|
2183
|
-
opacity:
|
|
2184
|
-
background: hsl(210, 40%, 96%);
|
|
2312
|
+
opacity: var(--hl-disabled-opacity);
|
|
2185
2313
|
background: var(--hl-surface-2);
|
|
2186
2314
|
}
|
|
2187
2315
|
|
|
2188
2316
|
.hl-select[data-hl-invalid],
|
|
2189
2317
|
.hl-select[aria-invalid='true'] {
|
|
2190
|
-
border-color: hsl(0, 72%, 51%);
|
|
2191
2318
|
border-color: var(--hl-danger);
|
|
2192
2319
|
}
|
|
2193
2320
|
|
|
@@ -2195,8 +2322,6 @@
|
|
|
2195
2322
|
--_height: var(--hl-control-height-sm);
|
|
2196
2323
|
--_font: var(--hl-text-xs);
|
|
2197
2324
|
|
|
2198
|
-
border-radius: 0.25rem;
|
|
2199
|
-
|
|
2200
2325
|
border-radius: var(--hl-radius-sm);
|
|
2201
2326
|
}
|
|
2202
2327
|
|
|
@@ -2204,253 +2329,256 @@
|
|
|
2204
2329
|
--_height: var(--hl-control-height-lg);
|
|
2205
2330
|
--_font: var(--hl-text-base);
|
|
2206
2331
|
}
|
|
2332
|
+
|
|
2333
|
+
@media (forced-colors: active) {
|
|
2334
|
+
.hl-select:focus-visible {
|
|
2335
|
+
outline: var(--hl-focus-ring);
|
|
2336
|
+
outline-offset: var(--hl-focus-offset);
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2207
2339
|
}
|
|
2208
2340
|
|
|
2209
2341
|
/**
|
|
2210
|
-
* Checkbox: `<label class="hl-checkbox"><input type="checkbox"><span
|
|
2211
|
-
* The native input is restyled (appearance:none) with a CSS checkmark, keeping
|
|
2212
|
-
* full keyboard
|
|
2342
|
+
* Checkbox: `<label class="hl-checkbox"><input type="checkbox"><span>...</span></label>`.
|
|
2343
|
+
* The native input is restyled (appearance: none) with a CSS checkmark, keeping
|
|
2344
|
+
* full keyboard and form semantics. Pure CSS; there is no enhancer.
|
|
2213
2345
|
*/
|
|
2214
2346
|
|
|
2215
2347
|
@layer components {
|
|
2216
2348
|
.hl-checkbox {
|
|
2217
2349
|
display: inline-flex;
|
|
2218
2350
|
align-items: center;
|
|
2219
|
-
gap: 0.5rem;
|
|
2220
2351
|
gap: var(--hl-space-2);
|
|
2221
|
-
font-size: 0.875rem;
|
|
2222
2352
|
font-size: var(--hl-text-sm);
|
|
2223
|
-
line-height: 1.5;
|
|
2224
2353
|
line-height: var(--hl-leading-normal);
|
|
2225
2354
|
cursor: pointer;
|
|
2226
2355
|
}
|
|
2227
2356
|
|
|
2228
2357
|
.hl-checkbox > input[type='checkbox'] {
|
|
2229
|
-
|
|
2230
|
-
-moz-appearance: none;
|
|
2231
|
-
appearance: none;
|
|
2358
|
+
appearance: none;
|
|
2232
2359
|
flex: none;
|
|
2233
|
-
|
|
2234
|
-
|
|
2360
|
+
inline-size: 1.15rem;
|
|
2361
|
+
block-size: 1.15rem;
|
|
2235
2362
|
margin: 0;
|
|
2236
|
-
border: 2px solid hsl(213, 27%, 84%);
|
|
2237
2363
|
border: var(--hl-border-width-2) solid var(--hl-border-strong);
|
|
2238
|
-
border-radius: 0.25rem;
|
|
2239
2364
|
border-radius: var(--hl-radius-sm);
|
|
2240
|
-
background: hsl(0, 0%, 100%);
|
|
2241
2365
|
background: var(--hl-surface);
|
|
2242
2366
|
display: grid;
|
|
2243
|
-
align-content: center;
|
|
2244
|
-
justify-content: center;
|
|
2245
2367
|
place-content: center;
|
|
2246
2368
|
cursor: pointer;
|
|
2247
2369
|
transition:
|
|
2248
|
-
background-color
|
|
2249
|
-
|
|
2250
|
-
background-color var(--hl-duration-fast) var(--hl-ease-standard), border-color var(--hl-duration-fast) var(--hl-ease-standard);
|
|
2370
|
+
background-color var(--hl-duration-fast) var(--hl-ease-standard),
|
|
2371
|
+
border-color var(--hl-duration-fast) var(--hl-ease-standard);
|
|
2251
2372
|
}
|
|
2252
2373
|
|
|
2374
|
+
/* The mark is a rotated L drawn with two borders; direction-neutral. */
|
|
2253
2375
|
.hl-checkbox > input[type='checkbox']::after {
|
|
2254
2376
|
content: '';
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
border: solid hsl(0, 0%, 100%);
|
|
2377
|
+
inline-size: 0.34rem;
|
|
2378
|
+
block-size: 0.62rem;
|
|
2258
2379
|
border: solid var(--hl-primary-fg);
|
|
2259
2380
|
border-width: 0 2px 2px 0;
|
|
2260
|
-
margin-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
transition:
|
|
2381
|
+
margin-block-start: -2px;
|
|
2382
|
+
rotate: 45deg;
|
|
2383
|
+
scale: 0;
|
|
2384
|
+
transition: scale var(--hl-duration-fast) var(--hl-ease-emphasized);
|
|
2264
2385
|
}
|
|
2265
2386
|
|
|
2266
2387
|
.hl-checkbox > input[type='checkbox']:checked,
|
|
2267
2388
|
.hl-checkbox > input[type='checkbox']:indeterminate {
|
|
2268
|
-
background: hsl(221, 83%, 53%);
|
|
2269
2389
|
background: var(--hl-primary);
|
|
2270
|
-
border-color: hsl(221, 83%, 53%);
|
|
2271
2390
|
border-color: var(--hl-primary);
|
|
2272
2391
|
}
|
|
2273
2392
|
|
|
2274
2393
|
.hl-checkbox > input[type='checkbox']:checked::after {
|
|
2275
|
-
|
|
2394
|
+
scale: 1;
|
|
2276
2395
|
}
|
|
2277
2396
|
|
|
2278
2397
|
.hl-checkbox > input[type='checkbox']:indeterminate::after {
|
|
2279
|
-
|
|
2280
|
-
|
|
2398
|
+
inline-size: 0.6rem;
|
|
2399
|
+
block-size: 0;
|
|
2281
2400
|
margin: 0;
|
|
2282
2401
|
border-width: 0 0 2px;
|
|
2283
|
-
|
|
2402
|
+
rotate: none;
|
|
2403
|
+
scale: 1;
|
|
2284
2404
|
}
|
|
2285
2405
|
|
|
2286
2406
|
.hl-checkbox > input[type='checkbox']:focus-visible {
|
|
2287
|
-
outline: 2px solid hsl(217, 91%, 60%);
|
|
2288
2407
|
outline: var(--hl-focus-ring);
|
|
2289
|
-
outline-offset:
|
|
2408
|
+
outline-offset: var(--hl-focus-offset);
|
|
2290
2409
|
}
|
|
2291
2410
|
|
|
2292
2411
|
.hl-checkbox > input[type='checkbox']:disabled {
|
|
2293
2412
|
cursor: not-allowed;
|
|
2294
|
-
opacity:
|
|
2413
|
+
opacity: var(--hl-disabled-opacity);
|
|
2295
2414
|
}
|
|
2296
2415
|
|
|
2297
2416
|
.hl-checkbox:has(> input:disabled) {
|
|
2298
2417
|
cursor: not-allowed;
|
|
2299
|
-
color: hsl(215, 16%, 47%);
|
|
2300
2418
|
color: var(--hl-fg-subtle);
|
|
2301
2419
|
}
|
|
2420
|
+
|
|
2421
|
+
/* The custom-drawn mark must keep its own colors to stay visible on the
|
|
2422
|
+
Highlight fill; everything else follows the system palette. */
|
|
2423
|
+
@media (forced-colors: active) {
|
|
2424
|
+
.hl-checkbox > input[type='checkbox']::after {
|
|
2425
|
+
forced-color-adjust: none;
|
|
2426
|
+
border-color: HighlightText;
|
|
2427
|
+
}
|
|
2428
|
+
}
|
|
2302
2429
|
}
|
|
2303
2430
|
|
|
2304
2431
|
/**
|
|
2305
|
-
* Radio: `<label class="hl-radio"><input type="radio"><span
|
|
2306
|
-
* grouped in `<div class="hl-radio-group" role="radiogroup">`.
|
|
2432
|
+
* Radio group: `<label class="hl-radio"><input type="radio"><span>...</span></label>`
|
|
2433
|
+
* items grouped in `<div class="hl-radio-group" role="radiogroup">`. Native
|
|
2434
|
+
* radios provide selection and arrow-key movement; pure CSS, there is no
|
|
2435
|
+
* enhancer.
|
|
2436
|
+
* data-hl-orientation: vertical (default) | horizontal (on the group)
|
|
2307
2437
|
*/
|
|
2308
2438
|
|
|
2309
2439
|
@layer components {
|
|
2310
2440
|
.hl-radio-group {
|
|
2311
2441
|
display: flex;
|
|
2312
2442
|
flex-direction: column;
|
|
2313
|
-
gap: 0.5rem;
|
|
2314
2443
|
gap: var(--hl-space-2);
|
|
2315
2444
|
}
|
|
2316
2445
|
|
|
2317
2446
|
.hl-radio-group[data-hl-orientation='horizontal'] {
|
|
2318
2447
|
flex-direction: row;
|
|
2319
2448
|
flex-wrap: wrap;
|
|
2320
|
-
gap: 1rem;
|
|
2321
2449
|
gap: var(--hl-space-4);
|
|
2322
2450
|
}
|
|
2323
2451
|
|
|
2324
2452
|
.hl-radio {
|
|
2325
2453
|
display: inline-flex;
|
|
2326
2454
|
align-items: center;
|
|
2327
|
-
gap: 0.5rem;
|
|
2328
2455
|
gap: var(--hl-space-2);
|
|
2329
|
-
font-size: 0.875rem;
|
|
2330
2456
|
font-size: var(--hl-text-sm);
|
|
2331
|
-
line-height: 1.5;
|
|
2332
2457
|
line-height: var(--hl-leading-normal);
|
|
2333
2458
|
cursor: pointer;
|
|
2334
2459
|
}
|
|
2335
2460
|
|
|
2336
2461
|
.hl-radio > input[type='radio'] {
|
|
2337
|
-
|
|
2338
|
-
-moz-appearance: none;
|
|
2339
|
-
appearance: none;
|
|
2462
|
+
appearance: none;
|
|
2340
2463
|
flex: none;
|
|
2341
|
-
|
|
2342
|
-
|
|
2464
|
+
inline-size: 1.15rem;
|
|
2465
|
+
block-size: 1.15rem;
|
|
2343
2466
|
margin: 0;
|
|
2344
|
-
border: 2px solid hsl(213, 27%, 84%);
|
|
2345
2467
|
border: var(--hl-border-width-2) solid var(--hl-border-strong);
|
|
2346
|
-
border-radius: 9999px;
|
|
2347
2468
|
border-radius: var(--hl-radius-full);
|
|
2348
|
-
background: hsl(0, 0%, 100%);
|
|
2349
2469
|
background: var(--hl-surface);
|
|
2350
2470
|
display: grid;
|
|
2351
|
-
align-content: center;
|
|
2352
|
-
justify-content: center;
|
|
2353
2471
|
place-content: center;
|
|
2354
2472
|
cursor: pointer;
|
|
2355
|
-
transition: border-color 120ms cubic-bezier(0.2, 0, 0, 1);
|
|
2356
2473
|
transition: border-color var(--hl-duration-fast) var(--hl-ease-standard);
|
|
2357
2474
|
}
|
|
2358
2475
|
|
|
2359
2476
|
.hl-radio > input[type='radio']::after {
|
|
2360
2477
|
content: '';
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
border-radius: 9999px;
|
|
2478
|
+
inline-size: 0.6rem;
|
|
2479
|
+
block-size: 0.6rem;
|
|
2364
2480
|
border-radius: var(--hl-radius-full);
|
|
2365
|
-
background: hsl(221, 83%, 53%);
|
|
2366
2481
|
background: var(--hl-primary);
|
|
2367
|
-
|
|
2368
|
-
transition:
|
|
2369
|
-
transition: transform var(--hl-duration-fast) var(--hl-ease-emphasized);
|
|
2482
|
+
scale: 0;
|
|
2483
|
+
transition: scale var(--hl-duration-fast) var(--hl-ease-emphasized);
|
|
2370
2484
|
}
|
|
2371
2485
|
|
|
2372
2486
|
.hl-radio > input[type='radio']:checked {
|
|
2373
|
-
border-color: hsl(221, 83%, 53%);
|
|
2374
2487
|
border-color: var(--hl-primary);
|
|
2375
2488
|
}
|
|
2376
2489
|
|
|
2377
2490
|
.hl-radio > input[type='radio']:checked::after {
|
|
2378
|
-
|
|
2491
|
+
scale: 1;
|
|
2379
2492
|
}
|
|
2380
2493
|
|
|
2381
2494
|
.hl-radio > input[type='radio']:focus-visible {
|
|
2382
|
-
outline: 2px solid hsl(217, 91%, 60%);
|
|
2383
2495
|
outline: var(--hl-focus-ring);
|
|
2384
|
-
outline-offset:
|
|
2496
|
+
outline-offset: var(--hl-focus-offset);
|
|
2385
2497
|
}
|
|
2386
2498
|
|
|
2387
2499
|
.hl-radio > input[type='radio']:disabled {
|
|
2388
2500
|
cursor: not-allowed;
|
|
2389
|
-
opacity:
|
|
2501
|
+
opacity: var(--hl-disabled-opacity);
|
|
2390
2502
|
}
|
|
2391
2503
|
|
|
2392
2504
|
.hl-radio:has(> input:disabled) {
|
|
2393
2505
|
cursor: not-allowed;
|
|
2394
|
-
color: hsl(215, 16%, 47%);
|
|
2395
2506
|
color: var(--hl-fg-subtle);
|
|
2396
2507
|
}
|
|
2508
|
+
|
|
2509
|
+
/* The dot is custom-drawn, so it opts out of forced-color flattening. */
|
|
2510
|
+
@media (forced-colors: active) {
|
|
2511
|
+
.hl-radio > input[type='radio']::after {
|
|
2512
|
+
forced-color-adjust: none;
|
|
2513
|
+
background: Highlight;
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2397
2516
|
}
|
|
2398
2517
|
|
|
2518
|
+
/**
|
|
2519
|
+
* Switch: `<label data-hl-switch><input type="checkbox" role="switch"> Label</label>`.
|
|
2520
|
+
* The native checkbox is restyled as a track and thumb, so state, keyboard,
|
|
2521
|
+
* and form submission stay native. Pure CSS; there is no enhancer.
|
|
2522
|
+
* data-hl-switch: the label wrapper
|
|
2523
|
+
*/
|
|
2524
|
+
|
|
2399
2525
|
@layer components {
|
|
2400
2526
|
[data-hl-switch] {
|
|
2527
|
+
--_track-inline: 2.25rem;
|
|
2528
|
+
--_track-block: 1.25rem;
|
|
2529
|
+
--_gap: 2px;
|
|
2530
|
+
--_thumb: calc(var(--_track-block) - var(--_gap) * 2);
|
|
2531
|
+
--_travel: calc(var(--_track-inline) - var(--_track-block));
|
|
2532
|
+
|
|
2401
2533
|
display: inline-flex;
|
|
2402
2534
|
align-items: center;
|
|
2403
|
-
gap: 0.5rem;
|
|
2404
2535
|
gap: var(--hl-space-2);
|
|
2405
2536
|
}
|
|
2406
2537
|
|
|
2407
2538
|
[data-hl-switch] input[type='checkbox'] {
|
|
2408
|
-
|
|
2409
|
-
-moz-appearance: none;
|
|
2410
|
-
appearance: none;
|
|
2411
|
-
width: 2.25rem;
|
|
2412
|
-
height: 1.25rem;
|
|
2413
|
-
border-radius: 1.25rem;
|
|
2414
|
-
background: hsl(213, 27%, 84%);
|
|
2415
|
-
background: var(--hl-border-strong);
|
|
2539
|
+
appearance: none;
|
|
2416
2540
|
position: relative;
|
|
2417
|
-
|
|
2418
|
-
|
|
2541
|
+
inline-size: var(--_track-inline);
|
|
2542
|
+
block-size: var(--_track-block);
|
|
2543
|
+
margin: 0;
|
|
2544
|
+
border-radius: var(--hl-radius-full);
|
|
2545
|
+
background: var(--hl-border-strong);
|
|
2419
2546
|
transition: background-color var(--hl-duration-fast) var(--hl-ease-standard);
|
|
2420
2547
|
}
|
|
2421
2548
|
|
|
2549
|
+
/* The thumb rests at the inline start and travels toward the inline end,
|
|
2550
|
+
so it is placed logically and slides left under RTL. */
|
|
2422
2551
|
[data-hl-switch] input[type='checkbox']::after {
|
|
2423
2552
|
content: '';
|
|
2424
2553
|
position: absolute;
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
height: calc(1.25rem - 4px);
|
|
2431
|
-
border-radius: 50%;
|
|
2432
|
-
background: hsl(0, 0%, 100%);
|
|
2554
|
+
inset-block-start: var(--_gap);
|
|
2555
|
+
inset-inline-start: var(--_gap);
|
|
2556
|
+
inline-size: var(--_thumb);
|
|
2557
|
+
block-size: var(--_thumb);
|
|
2558
|
+
border-radius: var(--hl-radius-full);
|
|
2433
2559
|
background: var(--hl-surface);
|
|
2434
|
-
transition:
|
|
2435
|
-
transition: transform var(--hl-duration-fast) var(--hl-ease-standard);
|
|
2560
|
+
transition: translate var(--hl-duration-fast) var(--hl-ease-standard);
|
|
2436
2561
|
}
|
|
2437
2562
|
|
|
2438
2563
|
[data-hl-switch] input[type='checkbox']:checked::after {
|
|
2439
|
-
|
|
2564
|
+
translate: var(--_travel) 0;
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
[data-hl-switch] input[type='checkbox']:checked:dir(rtl)::after {
|
|
2568
|
+
translate: calc(var(--_travel) * -1) 0;
|
|
2440
2569
|
}
|
|
2441
2570
|
|
|
2442
2571
|
[data-hl-switch] input[type='checkbox']:checked {
|
|
2443
|
-
background: hsl(221, 83%, 53%);
|
|
2444
2572
|
background: var(--hl-primary);
|
|
2445
2573
|
}
|
|
2446
2574
|
|
|
2447
2575
|
[data-hl-switch] input[type='checkbox']:focus-visible {
|
|
2448
|
-
outline: 2px solid hsl(217, 91%, 60%);
|
|
2449
2576
|
outline: var(--hl-focus-ring);
|
|
2577
|
+
outline-offset: var(--hl-focus-offset);
|
|
2450
2578
|
}
|
|
2451
2579
|
|
|
2452
2580
|
[data-hl-switch] input[type='checkbox']:disabled {
|
|
2453
|
-
opacity:
|
|
2581
|
+
opacity: var(--hl-disabled-opacity);
|
|
2454
2582
|
cursor: not-allowed;
|
|
2455
2583
|
}
|
|
2456
2584
|
|
|
@@ -2458,94 +2586,102 @@
|
|
|
2458
2586
|
opacity: 0.7;
|
|
2459
2587
|
cursor: not-allowed;
|
|
2460
2588
|
}
|
|
2589
|
+
|
|
2590
|
+
/* The track needs an edge once its fill is flattened, and the custom-drawn
|
|
2591
|
+
thumb keeps its own colors so it stays visible on both states. */
|
|
2592
|
+
@media (forced-colors: active) {
|
|
2593
|
+
[data-hl-switch] input[type='checkbox'] {
|
|
2594
|
+
border: var(--hl-border-width) solid ButtonBorder;
|
|
2595
|
+
}
|
|
2596
|
+
|
|
2597
|
+
[data-hl-switch] input[type='checkbox']:checked {
|
|
2598
|
+
background: Highlight;
|
|
2599
|
+
border-color: Highlight;
|
|
2600
|
+
}
|
|
2601
|
+
|
|
2602
|
+
[data-hl-switch] input[type='checkbox']::after {
|
|
2603
|
+
forced-color-adjust: none;
|
|
2604
|
+
background: ButtonText;
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
[data-hl-switch] input[type='checkbox']:checked::after {
|
|
2608
|
+
background: HighlightText;
|
|
2609
|
+
}
|
|
2610
|
+
}
|
|
2461
2611
|
}
|
|
2462
2612
|
|
|
2463
2613
|
/**
|
|
2464
2614
|
* Field, accessible form-control layout: `.hl-field` stacks a `.hl-label`,
|
|
2465
2615
|
* the control, `.hl-help`, and `.hl-error`. `.hl-fieldset` + `.hl-legend`
|
|
2466
|
-
* group related fields.
|
|
2616
|
+
* group related fields. Pure CSS; there is no enhancer.
|
|
2617
|
+
* data-hl-required: on `.hl-label`, appends an asterisk
|
|
2618
|
+
* data-hl-invalid: on `.hl-field`, colors the label as an error
|
|
2467
2619
|
*/
|
|
2468
2620
|
|
|
2469
2621
|
@layer components {
|
|
2470
2622
|
.hl-field {
|
|
2471
2623
|
display: flex;
|
|
2472
2624
|
flex-direction: column;
|
|
2473
|
-
gap: 0.375rem;
|
|
2474
2625
|
gap: var(--hl-space-1-5);
|
|
2475
2626
|
}
|
|
2476
2627
|
|
|
2477
2628
|
.hl-label {
|
|
2478
|
-
font-size: 0.875rem;
|
|
2479
2629
|
font-size: var(--hl-text-sm);
|
|
2480
|
-
font-weight: 500;
|
|
2481
2630
|
font-weight: var(--hl-font-medium);
|
|
2482
|
-
color: hsl(222, 47%, 11%);
|
|
2483
2631
|
color: var(--hl-fg);
|
|
2484
2632
|
}
|
|
2485
2633
|
|
|
2486
2634
|
.hl-label[data-hl-required]::after {
|
|
2487
2635
|
content: '*';
|
|
2488
|
-
margin-
|
|
2489
|
-
margin-left: var(--hl-space-1);
|
|
2490
|
-
color: hsl(0, 72%, 51%);
|
|
2636
|
+
margin-inline-start: var(--hl-space-1);
|
|
2491
2637
|
color: var(--hl-danger);
|
|
2492
2638
|
}
|
|
2493
2639
|
|
|
2494
2640
|
.hl-help {
|
|
2495
2641
|
margin: 0;
|
|
2496
|
-
font-size: 0.75rem;
|
|
2497
2642
|
font-size: var(--hl-text-xs);
|
|
2498
|
-
color: hsl(215, 19%, 35%);
|
|
2499
2643
|
color: var(--hl-fg-muted);
|
|
2500
2644
|
}
|
|
2501
2645
|
|
|
2502
2646
|
.hl-error {
|
|
2503
2647
|
margin: 0;
|
|
2504
|
-
font-size: 0.75rem;
|
|
2505
2648
|
font-size: var(--hl-text-xs);
|
|
2506
|
-
font-weight: 500;
|
|
2507
2649
|
font-weight: var(--hl-font-medium);
|
|
2508
|
-
color: hsl(0, 72%, 51%);
|
|
2509
2650
|
color: var(--hl-danger);
|
|
2510
2651
|
}
|
|
2511
2652
|
|
|
2512
2653
|
.hl-field[data-hl-invalid] .hl-label {
|
|
2513
|
-
color: hsl(0, 72%, 51%);
|
|
2514
2654
|
color: var(--hl-danger);
|
|
2515
2655
|
}
|
|
2516
2656
|
|
|
2517
2657
|
.hl-fieldset {
|
|
2518
2658
|
margin: 0;
|
|
2519
|
-
padding: 1rem;
|
|
2520
2659
|
padding: var(--hl-space-4);
|
|
2521
|
-
border: 1px solid hsl(214, 32%, 91%);
|
|
2522
2660
|
border: var(--hl-border-width) solid var(--hl-border);
|
|
2523
|
-
border-radius: 0.5rem;
|
|
2524
2661
|
border-radius: var(--hl-radius-lg);
|
|
2525
2662
|
display: flex;
|
|
2526
2663
|
flex-direction: column;
|
|
2527
|
-
gap: 1rem;
|
|
2528
2664
|
gap: var(--hl-space-4);
|
|
2529
2665
|
}
|
|
2530
2666
|
|
|
2531
2667
|
.hl-legend {
|
|
2532
|
-
padding-
|
|
2533
|
-
padding-right: 0.5rem;
|
|
2534
|
-
padding-left: var(--hl-space-2);
|
|
2535
|
-
padding-right: var(--hl-space-2);
|
|
2536
|
-
font-size: 0.875rem;
|
|
2668
|
+
padding-inline: var(--hl-space-2);
|
|
2537
2669
|
font-size: var(--hl-text-sm);
|
|
2538
|
-
font-weight: 600;
|
|
2539
2670
|
font-weight: var(--hl-font-semibold);
|
|
2540
|
-
color: hsl(222, 47%, 11%);
|
|
2541
2671
|
color: var(--hl-fg);
|
|
2542
2672
|
}
|
|
2543
2673
|
}
|
|
2544
2674
|
|
|
2545
2675
|
/**
|
|
2546
2676
|
* Combobox: `<div data-hl-combobox>` wrapping an `<input>` and a
|
|
2547
|
-
* `<ul role="listbox">` of `<li role="option">`.
|
|
2548
|
-
*
|
|
2677
|
+
* `<ul role="listbox">` of `<li role="option">`.
|
|
2678
|
+
*
|
|
2679
|
+
* No-JS baseline: the listbox is hidden until the root has focus within it,
|
|
2680
|
+
* so the options are at least reachable and readable. The enhancer marks the
|
|
2681
|
+
* root `data-hl-ready` and then owns visibility through `hidden`, filtering,
|
|
2682
|
+
* and `aria-activedescendant`.
|
|
2683
|
+
* data-hl-combobox: root
|
|
2684
|
+
* data-hl-ready: set by the enhancer; the baseline rules stand down
|
|
2549
2685
|
*/
|
|
2550
2686
|
|
|
2551
2687
|
@layer components {
|
|
@@ -2556,25 +2692,17 @@
|
|
|
2556
2692
|
|
|
2557
2693
|
[data-hl-combobox] [role='listbox'] {
|
|
2558
2694
|
position: absolute;
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
left: 0;
|
|
2562
|
-
right: 0;
|
|
2563
|
-
z-index: 1000;
|
|
2695
|
+
inset-block-start: calc(100% + var(--hl-space-1));
|
|
2696
|
+
inset-inline: 0;
|
|
2564
2697
|
z-index: var(--hl-z-dropdown);
|
|
2565
|
-
max-
|
|
2698
|
+
max-block-size: 16rem;
|
|
2566
2699
|
margin: 0;
|
|
2567
|
-
padding: 0.25rem;
|
|
2568
2700
|
padding: var(--hl-space-1);
|
|
2569
2701
|
overflow-y: auto;
|
|
2570
2702
|
list-style: none;
|
|
2571
|
-
background: hsl(0, 0%, 100%);
|
|
2572
2703
|
background: var(--hl-overlay);
|
|
2573
|
-
border: 1px solid hsl(214, 32%, 91%);
|
|
2574
2704
|
border: var(--hl-border-width) solid var(--hl-border);
|
|
2575
|
-
border-radius: 0.5rem;
|
|
2576
2705
|
border-radius: var(--hl-radius-lg);
|
|
2577
|
-
box-shadow: 0 10px 15px -3px hsla(222, 47%, 11%, 0.1), 0 4px 6px -4px hsla(222, 47%, 11%, 0.1);
|
|
2578
2706
|
box-shadow: var(--hl-overlay-shadow);
|
|
2579
2707
|
}
|
|
2580
2708
|
|
|
@@ -2583,18 +2711,11 @@
|
|
|
2583
2711
|
@supports (anchor-name: --x) {
|
|
2584
2712
|
[data-hl-combobox] [role='listbox'] {
|
|
2585
2713
|
position: fixed;
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
bottom: auto;
|
|
2589
|
-
left: auto;
|
|
2590
|
-
width: anchor-size(width);
|
|
2591
|
-
inset-area: block-end;
|
|
2714
|
+
inset: auto;
|
|
2715
|
+
inline-size: anchor-size(width);
|
|
2592
2716
|
position-area: block-end;
|
|
2593
2717
|
position-try-fallbacks: flip-block;
|
|
2594
|
-
margin-
|
|
2595
|
-
margin-bottom: 0.25rem;
|
|
2596
|
-
margin-top: var(--hl-space-1);
|
|
2597
|
-
margin-bottom: var(--hl-space-1);
|
|
2718
|
+
margin-block: var(--hl-space-1);
|
|
2598
2719
|
}
|
|
2599
2720
|
}
|
|
2600
2721
|
|
|
@@ -2602,27 +2723,37 @@
|
|
|
2602
2723
|
display: none;
|
|
2603
2724
|
}
|
|
2604
2725
|
|
|
2726
|
+
/* No-JS baseline: reveal the list while the field has focus. */
|
|
2727
|
+
[data-hl-combobox]:not([data-hl-ready]) [role='listbox'] {
|
|
2728
|
+
display: none;
|
|
2729
|
+
}
|
|
2730
|
+
|
|
2731
|
+
[data-hl-combobox]:not([data-hl-ready]):focus-within [role='listbox'] {
|
|
2732
|
+
display: block;
|
|
2733
|
+
}
|
|
2734
|
+
|
|
2735
|
+
/* The input may be a plain `<input>` rather than `.hl-input`; make sure it
|
|
2736
|
+
still shows a focus ring. */
|
|
2737
|
+
[data-hl-combobox] > input:focus-visible {
|
|
2738
|
+
outline: none;
|
|
2739
|
+
border-color: var(--hl-ring);
|
|
2740
|
+
box-shadow: var(--hl-focus-shadow);
|
|
2741
|
+
}
|
|
2742
|
+
|
|
2605
2743
|
[data-hl-combobox] [role='option'] {
|
|
2606
2744
|
display: flex;
|
|
2607
2745
|
align-items: center;
|
|
2608
|
-
gap: 0.5rem;
|
|
2609
2746
|
gap: var(--hl-space-2);
|
|
2610
|
-
padding: 0.5rem 0.75rem;
|
|
2611
2747
|
padding: var(--hl-space-2) var(--hl-space-3);
|
|
2612
|
-
border-radius: 0.375rem;
|
|
2613
2748
|
border-radius: var(--hl-radius-md);
|
|
2614
|
-
font-size: 0.875rem;
|
|
2615
2749
|
font-size: var(--hl-text-sm);
|
|
2616
|
-
color: hsl(222, 47%, 11%);
|
|
2617
2750
|
color: var(--hl-fg);
|
|
2618
2751
|
cursor: pointer;
|
|
2619
2752
|
}
|
|
2620
2753
|
|
|
2621
2754
|
[data-hl-combobox] [role='option']:hover,
|
|
2622
2755
|
[data-hl-combobox] [role='option'][aria-selected='true'] {
|
|
2623
|
-
background: hsl(214, 100%, 97%);
|
|
2624
2756
|
background: var(--hl-primary-subtle);
|
|
2625
|
-
color: hsl(224, 76%, 48%);
|
|
2626
2757
|
color: var(--hl-primary-subtle-fg);
|
|
2627
2758
|
}
|
|
2628
2759
|
|
|
@@ -2631,16 +2762,28 @@
|
|
|
2631
2762
|
}
|
|
2632
2763
|
|
|
2633
2764
|
[data-hl-combobox] [role='option'][aria-disabled='true'] {
|
|
2634
|
-
opacity:
|
|
2765
|
+
opacity: var(--hl-disabled-opacity);
|
|
2635
2766
|
pointer-events: none;
|
|
2636
2767
|
}
|
|
2768
|
+
|
|
2769
|
+
@media (forced-colors: active) {
|
|
2770
|
+
[data-hl-combobox] [role='option'][aria-selected='true'] {
|
|
2771
|
+
background: Highlight;
|
|
2772
|
+
color: HighlightText;
|
|
2773
|
+
}
|
|
2774
|
+
|
|
2775
|
+
[data-hl-combobox] [role='option'][aria-disabled='true'] {
|
|
2776
|
+
color: GrayText;
|
|
2777
|
+
}
|
|
2778
|
+
}
|
|
2637
2779
|
}
|
|
2638
2780
|
|
|
2639
2781
|
/**
|
|
2640
2782
|
* Segmented control: `<div class="hl-segmented" role="radiogroup">` of
|
|
2641
|
-
* `<label class="hl-segmented-item"><input type="radio"
|
|
2783
|
+
* `<label class="hl-segmented-item"><input type="radio">...</label>` segments.
|
|
2642
2784
|
* Radio inputs give free keyboard navigation; the checked segment is raised.
|
|
2643
|
-
* A button variant using `aria-pressed="true"` is also supported.
|
|
2785
|
+
* A button variant using `aria-pressed="true"` is also supported. Pure CSS;
|
|
2786
|
+
* there is no enhancer.
|
|
2644
2787
|
* data-hl-size: sm | md (default) | lg
|
|
2645
2788
|
*/
|
|
2646
2789
|
|
|
@@ -2648,15 +2791,10 @@
|
|
|
2648
2791
|
.hl-segmented {
|
|
2649
2792
|
display: inline-flex;
|
|
2650
2793
|
align-items: stretch;
|
|
2651
|
-
gap: 0.25rem;
|
|
2652
2794
|
gap: var(--hl-space-1);
|
|
2653
|
-
padding: 0.25rem;
|
|
2654
2795
|
padding: var(--hl-space-1);
|
|
2655
|
-
background: hsl(210, 40%, 96%);
|
|
2656
2796
|
background: var(--hl-surface-2);
|
|
2657
|
-
border: 1px solid hsl(214, 32%, 91%);
|
|
2658
2797
|
border: var(--hl-border-width) solid var(--hl-border);
|
|
2659
|
-
border-radius: 0.5rem;
|
|
2660
2798
|
border-radius: var(--hl-radius-lg);
|
|
2661
2799
|
}
|
|
2662
2800
|
|
|
@@ -2665,89 +2803,83 @@
|
|
|
2665
2803
|
display: inline-flex;
|
|
2666
2804
|
align-items: center;
|
|
2667
2805
|
justify-content: center;
|
|
2668
|
-
gap: 0.5rem;
|
|
2669
2806
|
gap: var(--hl-space-2);
|
|
2670
|
-
padding: 0.25rem 0.75rem;
|
|
2671
2807
|
padding: var(--hl-space-1) var(--hl-space-3);
|
|
2672
2808
|
border: 0;
|
|
2673
|
-
border-radius: 0.375rem;
|
|
2674
2809
|
border-radius: var(--hl-radius-md);
|
|
2675
2810
|
background: transparent;
|
|
2676
|
-
color: hsl(215, 19%, 35%);
|
|
2677
2811
|
color: var(--hl-fg-muted);
|
|
2678
2812
|
font: inherit;
|
|
2679
|
-
font-size: 0.875rem;
|
|
2680
2813
|
font-size: var(--hl-text-sm);
|
|
2681
|
-
font-weight: 500;
|
|
2682
2814
|
font-weight: var(--hl-font-medium);
|
|
2683
2815
|
white-space: nowrap;
|
|
2684
2816
|
cursor: pointer;
|
|
2685
2817
|
-webkit-user-select: none;
|
|
2686
|
-
-moz-user-select: none;
|
|
2687
2818
|
user-select: none;
|
|
2688
2819
|
transition:
|
|
2689
|
-
background-color
|
|
2690
|
-
|
|
2691
|
-
background-color var(--hl-duration-fast) var(--hl-ease-standard), color var(--hl-duration-fast) var(--hl-ease-standard);
|
|
2820
|
+
background-color var(--hl-duration-fast) var(--hl-ease-standard),
|
|
2821
|
+
color var(--hl-duration-fast) var(--hl-ease-standard);
|
|
2692
2822
|
}
|
|
2693
2823
|
|
|
2694
2824
|
.hl-segmented-item > input {
|
|
2695
2825
|
position: absolute;
|
|
2696
|
-
|
|
2697
|
-
right: 0;
|
|
2698
|
-
bottom: 0;
|
|
2699
|
-
left: 0;
|
|
2826
|
+
inset: 0;
|
|
2700
2827
|
margin: 0;
|
|
2701
2828
|
opacity: 0;
|
|
2702
2829
|
cursor: pointer;
|
|
2703
2830
|
}
|
|
2704
2831
|
|
|
2705
2832
|
.hl-segmented-item:hover {
|
|
2706
|
-
color: hsl(222, 47%, 11%);
|
|
2707
2833
|
color: var(--hl-fg);
|
|
2708
2834
|
}
|
|
2709
2835
|
|
|
2710
2836
|
.hl-segmented-item:has(input:checked),
|
|
2711
2837
|
.hl-segmented-item[aria-pressed='true'] {
|
|
2712
|
-
background: hsl(0, 0%, 100%);
|
|
2713
2838
|
background: var(--hl-surface);
|
|
2714
|
-
color: hsl(222, 47%, 11%);
|
|
2715
2839
|
color: var(--hl-fg);
|
|
2716
|
-
box-shadow: 0 1px 3px 0 hsla(222, 47%, 11%, 0.1), 0 1px 2px -1px hsla(222, 47%, 11%, 0.1);
|
|
2717
2840
|
box-shadow: var(--hl-shadow-sm);
|
|
2718
2841
|
}
|
|
2719
2842
|
|
|
2720
2843
|
.hl-segmented-item:has(input:focus-visible),
|
|
2721
2844
|
.hl-segmented-item[aria-pressed]:focus-visible {
|
|
2722
|
-
outline: 2px solid hsl(217, 91%, 60%);
|
|
2723
2845
|
outline: var(--hl-focus-ring);
|
|
2724
|
-
outline-offset:
|
|
2846
|
+
outline-offset: var(--hl-focus-offset);
|
|
2725
2847
|
}
|
|
2726
2848
|
|
|
2727
2849
|
.hl-segmented-item:has(input:disabled),
|
|
2728
2850
|
.hl-segmented-item:disabled {
|
|
2729
|
-
opacity:
|
|
2851
|
+
opacity: var(--hl-disabled-opacity);
|
|
2730
2852
|
cursor: not-allowed;
|
|
2731
2853
|
}
|
|
2732
2854
|
|
|
2733
2855
|
.hl-segmented[data-hl-size='sm'] .hl-segmented-item {
|
|
2734
|
-
padding: 0.125rem 0.5rem;
|
|
2735
2856
|
padding: 0.125rem var(--hl-space-2);
|
|
2736
|
-
font-size: 0.75rem;
|
|
2737
2857
|
font-size: var(--hl-text-xs);
|
|
2738
2858
|
}
|
|
2739
2859
|
|
|
2740
2860
|
.hl-segmented[data-hl-size='lg'] .hl-segmented-item {
|
|
2741
|
-
padding: 0.5rem 1rem;
|
|
2742
2861
|
padding: var(--hl-space-2) var(--hl-space-4);
|
|
2743
|
-
font-size: 1rem;
|
|
2744
2862
|
font-size: var(--hl-text-base);
|
|
2745
2863
|
}
|
|
2864
|
+
|
|
2865
|
+
/* The raised segment relies on a shadow, which forced colors remove. */
|
|
2866
|
+
@media (forced-colors: active) {
|
|
2867
|
+
.hl-segmented-item {
|
|
2868
|
+
border: var(--hl-border-width) solid ButtonBorder;
|
|
2869
|
+
}
|
|
2870
|
+
|
|
2871
|
+
.hl-segmented-item:has(input:checked),
|
|
2872
|
+
.hl-segmented-item[aria-pressed='true'] {
|
|
2873
|
+
background: Highlight;
|
|
2874
|
+
color: HighlightText;
|
|
2875
|
+
}
|
|
2876
|
+
}
|
|
2746
2877
|
}
|
|
2747
2878
|
|
|
2748
2879
|
/**
|
|
2749
2880
|
* Slider: native `<input type="range" class="hl-slider">`. Restyled track and
|
|
2750
|
-
* thumb across WebKit/Blink and Firefox while keeping native keyboard support
|
|
2881
|
+
* thumb across WebKit/Blink and Firefox while keeping native keyboard support
|
|
2882
|
+
* and RTL direction. Pure CSS; there is no enhancer.
|
|
2751
2883
|
*/
|
|
2752
2884
|
|
|
2753
2885
|
@layer components {
|
|
@@ -2755,78 +2887,56 @@
|
|
|
2755
2887
|
--_track: 0.375rem;
|
|
2756
2888
|
--_thumb: 1.15rem;
|
|
2757
2889
|
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
appearance: none;
|
|
2763
|
-
width: 100%;
|
|
2764
|
-
height: 1.15rem;
|
|
2765
|
-
height: var(--_thumb);
|
|
2890
|
+
appearance: none;
|
|
2891
|
+
inline-size: 100%;
|
|
2892
|
+
block-size: var(--_thumb);
|
|
2766
2893
|
margin: 0;
|
|
2767
2894
|
background: transparent;
|
|
2768
2895
|
cursor: pointer;
|
|
2769
2896
|
}
|
|
2770
2897
|
|
|
2771
2898
|
.hl-slider::-webkit-slider-runnable-track {
|
|
2772
|
-
|
|
2773
|
-
border-radius: 9999px;
|
|
2899
|
+
block-size: var(--_track);
|
|
2774
2900
|
border-radius: var(--hl-radius-full);
|
|
2775
|
-
background: hsl(214, 32%, 91%);
|
|
2776
2901
|
background: var(--hl-surface-3);
|
|
2777
2902
|
}
|
|
2778
2903
|
|
|
2779
2904
|
.hl-slider::-moz-range-track {
|
|
2780
|
-
|
|
2781
|
-
border-radius: 9999px;
|
|
2905
|
+
block-size: var(--_track);
|
|
2782
2906
|
border-radius: var(--hl-radius-full);
|
|
2783
|
-
background: hsl(214, 32%, 91%);
|
|
2784
2907
|
background: var(--hl-surface-3);
|
|
2785
2908
|
}
|
|
2786
2909
|
|
|
2787
2910
|
.hl-slider::-moz-range-progress {
|
|
2788
|
-
|
|
2789
|
-
border-radius: 9999px;
|
|
2911
|
+
block-size: var(--_track);
|
|
2790
2912
|
border-radius: var(--hl-radius-full);
|
|
2791
|
-
background: hsl(221, 83%, 53%);
|
|
2792
2913
|
background: var(--hl-primary);
|
|
2793
2914
|
}
|
|
2794
2915
|
|
|
2795
2916
|
.hl-slider::-webkit-slider-thumb {
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
margin-top: calc((var(--_track) - var(--_thumb)) / 2);
|
|
2801
|
-
border: 2px solid hsl(0, 0%, 100%);
|
|
2917
|
+
appearance: none;
|
|
2918
|
+
inline-size: var(--_thumb);
|
|
2919
|
+
block-size: var(--_thumb);
|
|
2920
|
+
margin-block-start: calc((var(--_track) - var(--_thumb)) / 2);
|
|
2802
2921
|
border: 2px solid var(--hl-surface);
|
|
2803
|
-
border-radius: 9999px;
|
|
2804
2922
|
border-radius: var(--hl-radius-full);
|
|
2805
|
-
background: hsl(221, 83%, 53%);
|
|
2806
2923
|
background: var(--hl-primary);
|
|
2807
|
-
box-shadow: 0 1px 3px 0 hsla(222, 47%, 11%, 0.1), 0 1px 2px -1px hsla(222, 47%, 11%, 0.1);
|
|
2808
2924
|
box-shadow: var(--hl-shadow-sm);
|
|
2809
|
-
-webkit-transition:
|
|
2810
|
-
transition:
|
|
2811
|
-
-webkit-transition: transform var(--hl-duration-fast) var(--hl-ease-standard);
|
|
2812
|
-
transition: transform var(--hl-duration-fast) var(--hl-ease-standard);
|
|
2925
|
+
-webkit-transition: scale var(--hl-duration-fast) var(--hl-ease-standard);
|
|
2926
|
+
transition: scale var(--hl-duration-fast) var(--hl-ease-standard);
|
|
2813
2927
|
}
|
|
2814
2928
|
|
|
2815
2929
|
.hl-slider::-moz-range-thumb {
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
border: 2px solid hsl(0, 0%, 100%);
|
|
2930
|
+
inline-size: var(--_thumb);
|
|
2931
|
+
block-size: var(--_thumb);
|
|
2819
2932
|
border: 2px solid var(--hl-surface);
|
|
2820
|
-
border-radius: 9999px;
|
|
2821
2933
|
border-radius: var(--hl-radius-full);
|
|
2822
|
-
background: hsl(221, 83%, 53%);
|
|
2823
2934
|
background: var(--hl-primary);
|
|
2824
|
-
box-shadow: 0 1px 3px 0 hsla(222, 47%, 11%, 0.1), 0 1px 2px -1px hsla(222, 47%, 11%, 0.1);
|
|
2825
2935
|
box-shadow: var(--hl-shadow-sm);
|
|
2826
2936
|
}
|
|
2827
2937
|
|
|
2828
2938
|
.hl-slider:active::-webkit-slider-thumb {
|
|
2829
|
-
|
|
2939
|
+
scale: 1.1;
|
|
2830
2940
|
}
|
|
2831
2941
|
|
|
2832
2942
|
.hl-slider:focus-visible {
|
|
@@ -2834,36 +2944,33 @@
|
|
|
2834
2944
|
}
|
|
2835
2945
|
|
|
2836
2946
|
.hl-slider:focus-visible::-webkit-slider-thumb {
|
|
2837
|
-
box-shadow:
|
|
2838
|
-
}
|
|
2839
|
-
|
|
2840
|
-
@supports (color: color-mix(in lch, red, blue)){
|
|
2841
|
-
.hl-slider:focus-visible::-webkit-slider-thumb {
|
|
2842
|
-
box-shadow: 0 0 0 4px color-mix(in oklab, var(--hl-ring) 35%, transparent);
|
|
2947
|
+
box-shadow: var(--hl-focus-shadow);
|
|
2843
2948
|
}
|
|
2844
|
-
}
|
|
2845
2949
|
|
|
2846
2950
|
.hl-slider:focus-visible::-moz-range-thumb {
|
|
2847
|
-
box-shadow:
|
|
2848
|
-
}
|
|
2849
|
-
|
|
2850
|
-
@supports (color: color-mix(in lch, red, blue)){
|
|
2851
|
-
.hl-slider:focus-visible::-moz-range-thumb {
|
|
2852
|
-
box-shadow: 0 0 0 4px color-mix(in oklab, var(--hl-ring) 35%, transparent);
|
|
2951
|
+
box-shadow: var(--hl-focus-shadow);
|
|
2853
2952
|
}
|
|
2854
|
-
}
|
|
2855
2953
|
|
|
2856
2954
|
.hl-slider:disabled {
|
|
2857
2955
|
cursor: not-allowed;
|
|
2858
|
-
opacity:
|
|
2956
|
+
opacity: var(--hl-disabled-opacity);
|
|
2957
|
+
}
|
|
2958
|
+
|
|
2959
|
+
/* Shadows vanish in forced colors, so focus falls back to an outline. */
|
|
2960
|
+
@media (forced-colors: active) {
|
|
2961
|
+
.hl-slider:focus-visible {
|
|
2962
|
+
outline: var(--hl-focus-ring);
|
|
2963
|
+
outline-offset: var(--hl-focus-offset);
|
|
2964
|
+
}
|
|
2859
2965
|
}
|
|
2860
2966
|
}
|
|
2861
2967
|
|
|
2862
2968
|
/* Feedback & data display */
|
|
2863
2969
|
|
|
2864
2970
|
/**
|
|
2865
|
-
* Alert: `<div class="hl-alert" role="alert" data-hl-intent="
|
|
2866
|
-
* optional icon, `.hl-alert-title`, and body content.
|
|
2971
|
+
* Alert: `<div class="hl-alert" role="alert" data-hl-intent="...">` with an
|
|
2972
|
+
* optional icon, `.hl-alert-title`, and body content. Pure CSS; there is no
|
|
2973
|
+
* enhancer.
|
|
2867
2974
|
* data-hl-intent: info (default) | success | warning | danger | neutral
|
|
2868
2975
|
*/
|
|
2869
2976
|
|
|
@@ -2874,24 +2981,14 @@
|
|
|
2874
2981
|
--_fg: var(--hl-info-subtle-fg);
|
|
2875
2982
|
|
|
2876
2983
|
display: flex;
|
|
2877
|
-
gap: 0.75rem;
|
|
2878
2984
|
gap: var(--hl-space-3);
|
|
2879
|
-
padding: 0.75rem 1rem;
|
|
2880
2985
|
padding: var(--hl-space-3) var(--hl-space-4);
|
|
2881
|
-
border: 1px solid transparent;
|
|
2882
2986
|
border: var(--hl-border-width) solid transparent;
|
|
2883
|
-
border-
|
|
2884
|
-
border-left: 3px solid hsl(200deg 98% 39%);
|
|
2885
|
-
border-left: 3px solid var(--_accent);
|
|
2886
|
-
border-radius: 0.375rem;
|
|
2987
|
+
border-inline-start: 3px solid var(--_accent);
|
|
2887
2988
|
border-radius: var(--hl-radius-md);
|
|
2888
|
-
background: hsl(204, 100%, 97%);
|
|
2889
2989
|
background: var(--_bg);
|
|
2890
|
-
color: hsl(201, 96%, 32%);
|
|
2891
2990
|
color: var(--_fg);
|
|
2892
|
-
font-size: 0.875rem;
|
|
2893
2991
|
font-size: var(--hl-text-sm);
|
|
2894
|
-
line-height: 1.5;
|
|
2895
2992
|
line-height: var(--hl-leading-normal);
|
|
2896
2993
|
}
|
|
2897
2994
|
|
|
@@ -2921,35 +3018,40 @@
|
|
|
2921
3018
|
|
|
2922
3019
|
.hl-alert > svg:first-child {
|
|
2923
3020
|
flex: none;
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
margin-
|
|
3021
|
+
inline-size: 1.25rem;
|
|
3022
|
+
block-size: 1.25rem;
|
|
3023
|
+
margin-block-start: 0.1rem;
|
|
2927
3024
|
color: var(--_accent);
|
|
2928
3025
|
}
|
|
2929
3026
|
|
|
2930
3027
|
.hl-alert-body {
|
|
2931
3028
|
display: flex;
|
|
2932
3029
|
flex-direction: column;
|
|
2933
|
-
gap: 0.25rem;
|
|
2934
3030
|
gap: var(--hl-space-1);
|
|
2935
|
-
min-
|
|
3031
|
+
min-inline-size: 0;
|
|
2936
3032
|
}
|
|
2937
3033
|
|
|
2938
3034
|
.hl-alert-title {
|
|
2939
3035
|
margin: 0;
|
|
2940
|
-
font-size: 0.875rem;
|
|
2941
3036
|
font-size: var(--hl-text-sm);
|
|
2942
|
-
font-weight: 600;
|
|
2943
3037
|
font-weight: var(--hl-font-semibold);
|
|
2944
3038
|
}
|
|
2945
3039
|
|
|
2946
3040
|
.hl-alert p {
|
|
2947
3041
|
margin: 0;
|
|
2948
3042
|
}
|
|
3043
|
+
|
|
3044
|
+
/* Fills are flattened in forced colors, so the outline carries the shape. */
|
|
3045
|
+
@media (forced-colors: active) {
|
|
3046
|
+
.hl-alert {
|
|
3047
|
+
border-color: CanvasText;
|
|
3048
|
+
}
|
|
3049
|
+
}
|
|
2949
3050
|
}
|
|
2950
3051
|
|
|
2951
3052
|
/**
|
|
2952
|
-
* Badge: `<span class="hl-badge" data-hl-intent="
|
|
3053
|
+
* Badge: `<span class="hl-badge" data-hl-intent="..." data-hl-variant="...">`.
|
|
3054
|
+
* Pure CSS; there is no enhancer.
|
|
2953
3055
|
* data-hl-intent: neutral (default) | primary | danger | success | warning | info
|
|
2954
3056
|
* data-hl-variant: soft (default) | solid | outline
|
|
2955
3057
|
* data-hl-size: sm | md (default)
|
|
@@ -2965,23 +3067,14 @@
|
|
|
2965
3067
|
|
|
2966
3068
|
display: inline-flex;
|
|
2967
3069
|
align-items: center;
|
|
2968
|
-
gap: 0.25rem;
|
|
2969
3070
|
gap: var(--hl-space-1);
|
|
2970
|
-
padding: 0.125rem 0.5rem;
|
|
2971
3071
|
padding: 0.125rem var(--hl-space-2);
|
|
2972
|
-
border: 1px solid transparent;
|
|
2973
3072
|
border: var(--hl-border-width) solid transparent;
|
|
2974
|
-
border-radius: 9999px;
|
|
2975
3073
|
border-radius: var(--hl-radius-full);
|
|
2976
|
-
background: hsl(210, 40%, 96%);
|
|
2977
3074
|
background: var(--_soft-bg);
|
|
2978
|
-
color: hsl(222, 47%, 11%);
|
|
2979
3075
|
color: var(--_soft-fg);
|
|
2980
|
-
font-size: 0.75rem;
|
|
2981
3076
|
font-size: var(--hl-text-xs);
|
|
2982
|
-
font-weight: 500;
|
|
2983
3077
|
font-weight: var(--hl-font-medium);
|
|
2984
|
-
line-height: 1.25;
|
|
2985
3078
|
line-height: var(--hl-leading-tight);
|
|
2986
3079
|
white-space: nowrap;
|
|
2987
3080
|
}
|
|
@@ -3038,15 +3131,22 @@
|
|
|
3038
3131
|
}
|
|
3039
3132
|
|
|
3040
3133
|
.hl-badge[data-hl-size='sm'] {
|
|
3041
|
-
padding: 0 0.375rem;
|
|
3042
3134
|
padding: 0 var(--hl-space-1-5);
|
|
3043
3135
|
font-size: 0.6875rem;
|
|
3044
3136
|
}
|
|
3137
|
+
|
|
3138
|
+
/* Soft and solid fills disappear in forced colors; keep the pill outline. */
|
|
3139
|
+
@media (forced-colors: active) {
|
|
3140
|
+
.hl-badge {
|
|
3141
|
+
border-color: CanvasText;
|
|
3142
|
+
}
|
|
3143
|
+
}
|
|
3045
3144
|
}
|
|
3046
3145
|
|
|
3047
3146
|
/**
|
|
3048
3147
|
* Card: `<div class="hl-card">` with optional `.hl-card-header`,
|
|
3049
3148
|
* `.hl-card-body`, `.hl-card-footer`, `.hl-card-title`, `.hl-card-description`.
|
|
3149
|
+
* Pure CSS; there is no enhancer.
|
|
3050
3150
|
* data-hl-interactive: hover/active elevation for clickable cards
|
|
3051
3151
|
*/
|
|
3052
3152
|
|
|
@@ -3054,13 +3154,9 @@
|
|
|
3054
3154
|
.hl-card {
|
|
3055
3155
|
display: flex;
|
|
3056
3156
|
flex-direction: column;
|
|
3057
|
-
background: hsl(0, 0%, 100%);
|
|
3058
3157
|
background: var(--hl-surface);
|
|
3059
|
-
border: 1px solid hsl(214, 32%, 91%);
|
|
3060
3158
|
border: var(--hl-border-width) solid var(--hl-border);
|
|
3061
|
-
border-radius: 0.75rem;
|
|
3062
3159
|
border-radius: var(--hl-radius-xl);
|
|
3063
|
-
box-shadow: 0 1px 3px 0 hsla(222, 47%, 11%, 0.1), 0 1px 2px -1px hsla(222, 47%, 11%, 0.1);
|
|
3064
3160
|
box-shadow: var(--hl-shadow-sm);
|
|
3065
3161
|
overflow: hidden;
|
|
3066
3162
|
}
|
|
@@ -3068,82 +3164,65 @@
|
|
|
3068
3164
|
.hl-card-header {
|
|
3069
3165
|
display: flex;
|
|
3070
3166
|
flex-direction: column;
|
|
3071
|
-
gap: 0.25rem;
|
|
3072
3167
|
gap: var(--hl-space-1);
|
|
3073
|
-
padding: 1rem 1.25rem;
|
|
3074
3168
|
padding: var(--hl-space-4) var(--hl-space-5);
|
|
3075
|
-
border-
|
|
3076
|
-
border-bottom: 1px solid hsl(214deg 32% 91%);
|
|
3077
|
-
border-bottom: var(--hl-border-width) solid var(--hl-border);
|
|
3169
|
+
border-block-end: var(--hl-border-width) solid var(--hl-border);
|
|
3078
3170
|
}
|
|
3079
3171
|
|
|
3080
3172
|
.hl-card-body {
|
|
3081
3173
|
flex: 1 1 auto;
|
|
3082
|
-
padding: 1.25rem;
|
|
3083
3174
|
padding: var(--hl-space-5);
|
|
3084
3175
|
}
|
|
3085
3176
|
|
|
3086
3177
|
.hl-card-footer {
|
|
3087
3178
|
display: flex;
|
|
3088
3179
|
align-items: center;
|
|
3089
|
-
gap: 0.5rem;
|
|
3090
3180
|
gap: var(--hl-space-2);
|
|
3091
|
-
padding: 1rem 1.25rem;
|
|
3092
3181
|
padding: var(--hl-space-4) var(--hl-space-5);
|
|
3093
|
-
border-
|
|
3094
|
-
border-top: 1px solid hsl(214deg 32% 91%);
|
|
3095
|
-
border-top: var(--hl-border-width) solid var(--hl-border);
|
|
3096
|
-
background: hsl(210, 40%, 96%);
|
|
3182
|
+
border-block-start: var(--hl-border-width) solid var(--hl-border);
|
|
3097
3183
|
background: var(--hl-surface-2);
|
|
3098
3184
|
}
|
|
3099
3185
|
|
|
3100
3186
|
.hl-card-title {
|
|
3101
3187
|
margin: 0;
|
|
3102
|
-
font-size: 1.125rem;
|
|
3103
3188
|
font-size: var(--hl-text-lg);
|
|
3104
|
-
font-weight: 600;
|
|
3105
3189
|
font-weight: var(--hl-font-semibold);
|
|
3106
|
-
line-height: 1.25;
|
|
3107
3190
|
line-height: var(--hl-leading-tight);
|
|
3108
3191
|
}
|
|
3109
3192
|
|
|
3110
3193
|
.hl-card-description {
|
|
3111
3194
|
margin: 0;
|
|
3112
|
-
font-size: 0.875rem;
|
|
3113
3195
|
font-size: var(--hl-text-sm);
|
|
3114
|
-
color: hsl(215, 19%, 35%);
|
|
3115
3196
|
color: var(--hl-fg-muted);
|
|
3116
3197
|
}
|
|
3117
3198
|
|
|
3118
3199
|
.hl-card[data-hl-interactive] {
|
|
3119
3200
|
cursor: pointer;
|
|
3120
3201
|
transition:
|
|
3121
|
-
border-color
|
|
3122
|
-
|
|
3123
|
-
|
|
3202
|
+
border-color var(--hl-duration-fast) var(--hl-ease-standard),
|
|
3203
|
+
box-shadow var(--hl-duration-base) var(--hl-ease-standard),
|
|
3204
|
+
translate var(--hl-duration-base) var(--hl-ease-standard);
|
|
3124
3205
|
}
|
|
3125
3206
|
|
|
3126
3207
|
.hl-card[data-hl-interactive]:hover {
|
|
3127
|
-
border-color: hsl(213, 27%, 84%);
|
|
3128
3208
|
border-color: var(--hl-border-strong);
|
|
3129
|
-
box-shadow: 0 4px 6px -1px hsla(222, 47%, 11%, 0.1), 0 2px 4px -2px hsla(222, 47%, 11%, 0.1);
|
|
3130
3209
|
box-shadow: var(--hl-shadow-md);
|
|
3131
3210
|
}
|
|
3132
3211
|
|
|
3133
3212
|
.hl-card[data-hl-interactive]:focus-within {
|
|
3134
|
-
outline: 2px solid hsl(217, 91%, 60%);
|
|
3135
3213
|
outline: var(--hl-focus-ring);
|
|
3136
|
-
outline-offset:
|
|
3214
|
+
outline-offset: var(--hl-focus-offset);
|
|
3137
3215
|
}
|
|
3138
3216
|
|
|
3139
3217
|
.hl-card[data-hl-interactive]:active {
|
|
3140
|
-
|
|
3218
|
+
translate: 0 1px;
|
|
3141
3219
|
}
|
|
3142
3220
|
}
|
|
3143
3221
|
|
|
3144
3222
|
/**
|
|
3145
3223
|
* Avatar: `<span class="hl-avatar">` containing an `<img>` or fallback
|
|
3146
|
-
* initials/icon. Stack with `<div class="hl-avatar-group">`.
|
|
3224
|
+
* initials/icon. Stack with `<div class="hl-avatar-group">`. Pure CSS; there
|
|
3225
|
+
* is no enhancer.
|
|
3147
3226
|
* data-hl-size: xs | sm | md (default) | lg | xl
|
|
3148
3227
|
* data-hl-shape: square
|
|
3149
3228
|
*/
|
|
@@ -3154,42 +3233,30 @@
|
|
|
3154
3233
|
|
|
3155
3234
|
position: relative;
|
|
3156
3235
|
display: inline-grid;
|
|
3157
|
-
align-items: center;
|
|
3158
|
-
justify-items: center;
|
|
3159
3236
|
place-items: center;
|
|
3160
3237
|
flex: none;
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
height: 2.5rem;
|
|
3164
|
-
height: var(--_size);
|
|
3165
|
-
border-radius: 9999px;
|
|
3238
|
+
inline-size: var(--_size);
|
|
3239
|
+
block-size: var(--_size);
|
|
3166
3240
|
border-radius: var(--hl-radius-full);
|
|
3167
3241
|
overflow: hidden;
|
|
3168
|
-
background: hsl(214, 32%, 91%);
|
|
3169
3242
|
background: var(--hl-surface-3);
|
|
3170
|
-
color: hsl(215, 19%, 35%);
|
|
3171
3243
|
color: var(--hl-fg-muted);
|
|
3172
|
-
font-size: calc(2.5rem * 0.4);
|
|
3173
3244
|
font-size: calc(var(--_size) * 0.4);
|
|
3174
|
-
font-weight: 500;
|
|
3175
3245
|
font-weight: var(--hl-font-medium);
|
|
3176
3246
|
line-height: 1;
|
|
3177
3247
|
text-transform: uppercase;
|
|
3178
3248
|
-webkit-user-select: none;
|
|
3179
|
-
-moz-user-select: none;
|
|
3180
3249
|
user-select: none;
|
|
3181
3250
|
}
|
|
3182
3251
|
|
|
3183
3252
|
.hl-avatar[data-hl-shape='square'] {
|
|
3184
|
-
border-radius: 0.5rem;
|
|
3185
3253
|
border-radius: var(--hl-radius-lg);
|
|
3186
3254
|
}
|
|
3187
3255
|
|
|
3188
3256
|
.hl-avatar > img {
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
object-fit: cover;
|
|
3257
|
+
inline-size: 100%;
|
|
3258
|
+
block-size: 100%;
|
|
3259
|
+
object-fit: cover;
|
|
3193
3260
|
}
|
|
3194
3261
|
|
|
3195
3262
|
.hl-avatar[data-hl-size='xs'] {
|
|
@@ -3214,18 +3281,17 @@
|
|
|
3214
3281
|
}
|
|
3215
3282
|
|
|
3216
3283
|
.hl-avatar-group > .hl-avatar {
|
|
3217
|
-
box-shadow: 0 0 0 2px hsl(0, 0%, 100%);
|
|
3218
3284
|
box-shadow: 0 0 0 2px var(--hl-surface);
|
|
3219
3285
|
}
|
|
3220
3286
|
|
|
3221
3287
|
.hl-avatar-group > .hl-avatar:not(:first-child) {
|
|
3222
|
-
margin-
|
|
3288
|
+
margin-inline-start: -0.6rem;
|
|
3223
3289
|
}
|
|
3224
3290
|
}
|
|
3225
3291
|
|
|
3226
3292
|
/**
|
|
3227
3293
|
* Progress: native `<progress class="hl-progress" value max>`. Omit `value`
|
|
3228
|
-
* for an indeterminate bar.
|
|
3294
|
+
* for an indeterminate bar. Pure CSS; there is no enhancer.
|
|
3229
3295
|
* data-hl-intent: primary (default) | success | warning | danger | info
|
|
3230
3296
|
* data-hl-size: sm | md (default) | lg
|
|
3231
3297
|
*/
|
|
@@ -3235,21 +3301,13 @@
|
|
|
3235
3301
|
--_color: var(--hl-primary);
|
|
3236
3302
|
--_height: 0.5rem;
|
|
3237
3303
|
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
appearance: none;
|
|
3243
|
-
width: 100%;
|
|
3244
|
-
height: 0.5rem;
|
|
3245
|
-
height: var(--_height);
|
|
3304
|
+
appearance: none;
|
|
3305
|
+
inline-size: 100%;
|
|
3306
|
+
block-size: var(--_height);
|
|
3246
3307
|
border: 0;
|
|
3247
|
-
border-radius: 9999px;
|
|
3248
3308
|
border-radius: var(--hl-radius-full);
|
|
3249
3309
|
overflow: hidden;
|
|
3250
|
-
background: hsl(214, 32%, 91%);
|
|
3251
3310
|
background: var(--hl-surface-3);
|
|
3252
|
-
color: hsl(221, 83%, 53%);
|
|
3253
3311
|
color: var(--_color);
|
|
3254
3312
|
}
|
|
3255
3313
|
|
|
@@ -3283,28 +3341,21 @@
|
|
|
3283
3341
|
|
|
3284
3342
|
.hl-progress::-webkit-progress-value {
|
|
3285
3343
|
background: var(--_color);
|
|
3286
|
-
border-radius: 9999px;
|
|
3287
3344
|
border-radius: var(--hl-radius-full);
|
|
3288
|
-
-webkit-transition:
|
|
3289
|
-
transition:
|
|
3290
|
-
-webkit-transition: width var(--hl-duration-base) var(--hl-ease-standard);
|
|
3291
|
-
transition: width var(--hl-duration-base) var(--hl-ease-standard);
|
|
3345
|
+
-webkit-transition: inline-size var(--hl-duration-base) var(--hl-ease-standard);
|
|
3346
|
+
transition: inline-size var(--hl-duration-base) var(--hl-ease-standard);
|
|
3292
3347
|
}
|
|
3293
3348
|
|
|
3294
3349
|
.hl-progress::-moz-progress-bar {
|
|
3295
3350
|
background: var(--_color);
|
|
3296
|
-
border-radius: 9999px;
|
|
3297
3351
|
border-radius: var(--hl-radius-full);
|
|
3298
3352
|
}
|
|
3299
3353
|
|
|
3300
3354
|
.hl-progress:indeterminate {
|
|
3301
|
-
background: linear-gradient(90deg, transparent 0%, var(--_color) 50%, transparent 100%)
|
|
3302
|
-
hsl(214, 32%, 91%);
|
|
3303
3355
|
background: linear-gradient(90deg, transparent 0%, var(--_color) 50%, transparent 100%)
|
|
3304
3356
|
var(--hl-surface-3);
|
|
3305
3357
|
background-size: 40% 100%;
|
|
3306
3358
|
background-repeat: no-repeat;
|
|
3307
|
-
animation: hl-progress-indeterminate 1.2s cubic-bezier(0.2, 0, 0, 1) infinite;
|
|
3308
3359
|
animation: hl-progress-indeterminate 1.2s var(--hl-ease-standard) infinite;
|
|
3309
3360
|
}
|
|
3310
3361
|
|
|
@@ -3322,16 +3373,33 @@
|
|
|
3322
3373
|
}
|
|
3323
3374
|
}
|
|
3324
3375
|
|
|
3376
|
+
/* A static partial bar still signals "in progress" without motion. */
|
|
3325
3377
|
@media (prefers-reduced-motion: reduce) {
|
|
3326
3378
|
.hl-progress:indeterminate {
|
|
3327
|
-
animation
|
|
3379
|
+
animation: none;
|
|
3380
|
+
background-position: 30% 0;
|
|
3381
|
+
}
|
|
3382
|
+
}
|
|
3383
|
+
|
|
3384
|
+
@media (forced-colors: active) {
|
|
3385
|
+
.hl-progress {
|
|
3386
|
+
border: var(--hl-border-width) solid CanvasText;
|
|
3387
|
+
}
|
|
3388
|
+
|
|
3389
|
+
.hl-progress::-webkit-progress-value {
|
|
3390
|
+
background: Highlight;
|
|
3391
|
+
}
|
|
3392
|
+
|
|
3393
|
+
.hl-progress::-moz-progress-bar {
|
|
3394
|
+
background: Highlight;
|
|
3328
3395
|
}
|
|
3329
3396
|
}
|
|
3330
3397
|
}
|
|
3331
3398
|
|
|
3332
3399
|
/**
|
|
3333
3400
|
* Spinner: `<span class="hl-spinner" role="status" aria-label="Loading">`.
|
|
3334
|
-
* Inherits `currentColor`, so set `color` to theme it.
|
|
3401
|
+
* Inherits `currentColor`, so set `color` to theme it. Pure CSS; there is no
|
|
3402
|
+
* enhancer.
|
|
3335
3403
|
* data-hl-size: sm | md (default) | lg | xl
|
|
3336
3404
|
*/
|
|
3337
3405
|
|
|
@@ -3342,23 +3410,14 @@
|
|
|
3342
3410
|
|
|
3343
3411
|
display: inline-block;
|
|
3344
3412
|
flex: none;
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
border: 2px solid color-mix(in oklab, currentcolor 25%, transparent);
|
|
3350
|
-
border-top-color: currentcolor;
|
|
3351
|
-
border-radius: 9999px;
|
|
3413
|
+
inline-size: var(--_size);
|
|
3414
|
+
block-size: var(--_size);
|
|
3415
|
+
border: var(--_width) solid color-mix(in oklab, currentcolor 25%, transparent);
|
|
3416
|
+
border-block-start-color: currentcolor;
|
|
3352
3417
|
border-radius: var(--hl-radius-full);
|
|
3353
3418
|
animation: hl-spinner-rotate 0.6s linear infinite;
|
|
3354
3419
|
}
|
|
3355
3420
|
|
|
3356
|
-
@supports (color: color-mix(in lch, red, blue)){
|
|
3357
|
-
.hl-spinner {
|
|
3358
|
-
border: var(--_width) solid color-mix(in oklab, currentcolor 25%, transparent);
|
|
3359
|
-
}
|
|
3360
|
-
}
|
|
3361
|
-
|
|
3362
3421
|
.hl-spinner[data-hl-size='sm'] {
|
|
3363
3422
|
--_size: 1rem;
|
|
3364
3423
|
}
|
|
@@ -3379,32 +3438,36 @@
|
|
|
3379
3438
|
}
|
|
3380
3439
|
}
|
|
3381
3440
|
|
|
3441
|
+
/* A static arc still reads as "loading" without continuous motion. */
|
|
3382
3442
|
@media (prefers-reduced-motion: reduce) {
|
|
3383
3443
|
.hl-spinner {
|
|
3384
|
-
animation
|
|
3444
|
+
animation: none;
|
|
3445
|
+
}
|
|
3446
|
+
}
|
|
3447
|
+
|
|
3448
|
+
/* The faded ring is color-mixed, which forced colors flatten; keep the arc
|
|
3449
|
+
visible by drawing the rest of the ring in GrayText. */
|
|
3450
|
+
@media (forced-colors: active) {
|
|
3451
|
+
.hl-spinner {
|
|
3452
|
+
border-color: GrayText;
|
|
3453
|
+
border-block-start-color: CanvasText;
|
|
3385
3454
|
}
|
|
3386
3455
|
}
|
|
3387
3456
|
}
|
|
3388
3457
|
|
|
3389
3458
|
/**
|
|
3390
|
-
* Skeleton: `<span class="hl-skeleton" data-hl-
|
|
3391
|
-
* placeholder shown while content loads.
|
|
3392
|
-
*
|
|
3459
|
+
* Skeleton: `<span class="hl-skeleton" data-hl-shape="..." aria-hidden="true">`
|
|
3460
|
+
* placeholder shown while content loads. Pure CSS; there is no enhancer.
|
|
3461
|
+
* Size it with inline `inline-size`/`block-size`.
|
|
3462
|
+
* data-hl-shape: rect (default) | text | circle
|
|
3393
3463
|
*/
|
|
3394
3464
|
|
|
3395
3465
|
@layer components {
|
|
3396
3466
|
.hl-skeleton {
|
|
3397
3467
|
display: block;
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
border-radius: 0.375rem;
|
|
3468
|
+
inline-size: 100%;
|
|
3469
|
+
block-size: 1rem;
|
|
3401
3470
|
border-radius: var(--hl-radius-md);
|
|
3402
|
-
background: linear-gradient(
|
|
3403
|
-
90deg,
|
|
3404
|
-
hsl(214, 32%, 91%) 25%,
|
|
3405
|
-
hsl(210, 40%, 96%) 37%,
|
|
3406
|
-
hsl(214, 32%, 91%) 63%
|
|
3407
|
-
);
|
|
3408
3471
|
background: linear-gradient(
|
|
3409
3472
|
90deg,
|
|
3410
3473
|
var(--hl-surface-3) 25%,
|
|
@@ -3412,20 +3475,17 @@
|
|
|
3412
3475
|
var(--hl-surface-3) 63%
|
|
3413
3476
|
);
|
|
3414
3477
|
background-size: 400% 100%;
|
|
3415
|
-
animation: hl-skeleton-shimmer 1.4s cubic-bezier(0.2, 0, 0, 1) infinite;
|
|
3416
3478
|
animation: hl-skeleton-shimmer 1.4s var(--hl-ease-standard) infinite;
|
|
3417
3479
|
}
|
|
3418
3480
|
|
|
3419
|
-
.hl-skeleton[data-hl-
|
|
3420
|
-
|
|
3421
|
-
border-radius: 0.25rem;
|
|
3481
|
+
.hl-skeleton[data-hl-shape='text'] {
|
|
3482
|
+
block-size: 0.7em;
|
|
3422
3483
|
border-radius: var(--hl-radius-sm);
|
|
3423
3484
|
}
|
|
3424
3485
|
|
|
3425
|
-
.hl-skeleton[data-hl-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
border-radius: 9999px;
|
|
3486
|
+
.hl-skeleton[data-hl-shape='circle'] {
|
|
3487
|
+
inline-size: 2.5rem;
|
|
3488
|
+
block-size: 2.5rem;
|
|
3429
3489
|
border-radius: var(--hl-radius-full);
|
|
3430
3490
|
}
|
|
3431
3491
|
|
|
@@ -3442,15 +3502,22 @@
|
|
|
3442
3502
|
@media (prefers-reduced-motion: reduce) {
|
|
3443
3503
|
.hl-skeleton {
|
|
3444
3504
|
animation: none;
|
|
3445
|
-
background: hsl(214, 32%, 91%);
|
|
3446
3505
|
background: var(--hl-surface-3);
|
|
3447
3506
|
}
|
|
3448
3507
|
}
|
|
3508
|
+
|
|
3509
|
+
/* Fills flatten to Canvas in forced colors; outline the placeholder instead. */
|
|
3510
|
+
@media (forced-colors: active) {
|
|
3511
|
+
.hl-skeleton {
|
|
3512
|
+
border: var(--hl-border-width) solid GrayText;
|
|
3513
|
+
}
|
|
3514
|
+
}
|
|
3449
3515
|
}
|
|
3450
3516
|
|
|
3451
3517
|
/**
|
|
3452
3518
|
* Keyboard key: `<kbd class="hl-kbd">⌘</kbd>`. Combine inline, e.g.
|
|
3453
|
-
* `<kbd class="hl-kbd">⌘</kbd><kbd class="hl-kbd">K</kbd>`.
|
|
3519
|
+
* `<kbd class="hl-kbd">⌘</kbd><kbd class="hl-kbd">K</kbd>`. Pure CSS; there
|
|
3520
|
+
* is no enhancer.
|
|
3454
3521
|
*/
|
|
3455
3522
|
|
|
3456
3523
|
@layer components {
|
|
@@ -3458,19 +3525,13 @@
|
|
|
3458
3525
|
display: inline-flex;
|
|
3459
3526
|
align-items: center;
|
|
3460
3527
|
justify-content: center;
|
|
3461
|
-
min-
|
|
3528
|
+
min-inline-size: 1.5rem;
|
|
3462
3529
|
padding: 0.125rem 0.4rem;
|
|
3463
|
-
border: 1px solid hsl(213, 27%, 84%);
|
|
3464
3530
|
border: var(--hl-border-width) solid var(--hl-border-strong);
|
|
3465
|
-
border-
|
|
3466
|
-
border-bottom-width: var(--hl-border-width-2);
|
|
3467
|
-
border-radius: 0.25rem;
|
|
3531
|
+
border-block-end-width: var(--hl-border-width-2);
|
|
3468
3532
|
border-radius: var(--hl-radius-sm);
|
|
3469
|
-
background: hsl(210, 40%, 96%);
|
|
3470
3533
|
background: var(--hl-surface-2);
|
|
3471
|
-
color: hsl(222, 47%, 11%);
|
|
3472
3534
|
color: var(--hl-fg);
|
|
3473
|
-
font-family: ui-monospace, sfmono-regular, 'SF Mono', menlo, consolas, 'Liberation Mono', monospace;
|
|
3474
3535
|
font-family: var(--hl-font-mono);
|
|
3475
3536
|
font-size: 0.8125em;
|
|
3476
3537
|
line-height: 1;
|
|
@@ -3479,117 +3540,133 @@
|
|
|
3479
3540
|
}
|
|
3480
3541
|
|
|
3481
3542
|
/**
|
|
3482
|
-
* Table: `<table class="hl-table"
|
|
3483
|
-
*
|
|
3543
|
+
* Table: `<table class="hl-table">`, optionally inside
|
|
3544
|
+
* `<div class="hl-table-wrapper">` so wide tables scroll instead of breaking
|
|
3545
|
+
* the layout. Pure CSS; there is no enhancer.
|
|
3484
3546
|
* data-hl-striped: zebra rows
|
|
3485
3547
|
* data-hl-hover: highlight row on hover
|
|
3548
|
+
* data-hl-align: start (default) | center | end, on the table or a cell
|
|
3549
|
+
* data-hl-size: sm | md (default) | lg, cell padding density
|
|
3486
3550
|
*/
|
|
3487
3551
|
|
|
3488
3552
|
@layer components {
|
|
3553
|
+
.hl-table-wrapper {
|
|
3554
|
+
inline-size: 100%;
|
|
3555
|
+
overflow-x: auto;
|
|
3556
|
+
overscroll-behavior-x: contain;
|
|
3557
|
+
}
|
|
3558
|
+
|
|
3489
3559
|
.hl-table {
|
|
3490
|
-
|
|
3560
|
+
--_pad-y: var(--hl-space-2);
|
|
3561
|
+
--_pad-x: var(--hl-space-3);
|
|
3562
|
+
|
|
3563
|
+
inline-size: 100%;
|
|
3491
3564
|
border-collapse: collapse;
|
|
3492
|
-
font-size: 0.875rem;
|
|
3493
3565
|
font-size: var(--hl-text-sm);
|
|
3494
|
-
color: hsl(222, 47%, 11%);
|
|
3495
3566
|
color: var(--hl-fg);
|
|
3496
3567
|
}
|
|
3497
3568
|
|
|
3498
3569
|
.hl-table caption {
|
|
3499
|
-
padding-
|
|
3500
|
-
padding-bottom: 0.5rem;
|
|
3501
|
-
padding-top: var(--hl-space-2);
|
|
3502
|
-
padding-bottom: var(--hl-space-2);
|
|
3503
|
-
color: hsl(215, 19%, 35%);
|
|
3570
|
+
padding-block: var(--hl-space-2);
|
|
3504
3571
|
color: var(--hl-fg-muted);
|
|
3505
|
-
text-align:
|
|
3572
|
+
text-align: start;
|
|
3506
3573
|
caption-side: bottom;
|
|
3507
3574
|
}
|
|
3508
3575
|
|
|
3509
3576
|
.hl-table th,
|
|
3510
3577
|
.hl-table td {
|
|
3511
|
-
padding:
|
|
3512
|
-
|
|
3513
|
-
text-align: left;
|
|
3578
|
+
padding: var(--_pad-y) var(--_pad-x);
|
|
3579
|
+
text-align: start;
|
|
3514
3580
|
vertical-align: middle;
|
|
3515
|
-
border-
|
|
3516
|
-
border-bottom: 1px solid hsl(214deg 32% 91%);
|
|
3517
|
-
border-bottom: var(--hl-border-width) solid var(--hl-border);
|
|
3581
|
+
border-block-end: var(--hl-border-width) solid var(--hl-border);
|
|
3518
3582
|
}
|
|
3519
3583
|
|
|
3520
3584
|
.hl-table thead th {
|
|
3521
|
-
font-size: 0.75rem;
|
|
3522
3585
|
font-size: var(--hl-text-xs);
|
|
3523
|
-
font-weight: 600;
|
|
3524
3586
|
font-weight: var(--hl-font-semibold);
|
|
3525
3587
|
text-transform: uppercase;
|
|
3526
3588
|
letter-spacing: 0.03em;
|
|
3527
|
-
color: hsl(215, 19%, 35%);
|
|
3528
3589
|
color: var(--hl-fg-muted);
|
|
3529
|
-
border-
|
|
3530
|
-
border-bottom-color: hsl(213deg 27% 84%);
|
|
3531
|
-
border-bottom-color: var(--hl-border-strong);
|
|
3590
|
+
border-block-end-color: var(--hl-border-strong);
|
|
3532
3591
|
}
|
|
3533
3592
|
|
|
3534
3593
|
.hl-table tfoot td {
|
|
3535
|
-
font-weight: 500;
|
|
3536
3594
|
font-weight: var(--hl-font-medium);
|
|
3537
|
-
color: hsl(215, 19%, 35%);
|
|
3538
3595
|
color: var(--hl-fg-muted);
|
|
3539
3596
|
}
|
|
3540
3597
|
|
|
3541
3598
|
.hl-table[data-hl-striped] tbody tr:nth-child(even) {
|
|
3542
|
-
background: hsl(210, 40%, 96%);
|
|
3543
3599
|
background: var(--hl-surface-2);
|
|
3544
3600
|
}
|
|
3545
3601
|
|
|
3546
3602
|
.hl-table[data-hl-hover] tbody tr:hover {
|
|
3547
|
-
background:
|
|
3603
|
+
background: color-mix(in oklab, var(--hl-primary) 8%, transparent);
|
|
3548
3604
|
}
|
|
3549
3605
|
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3606
|
+
.hl-table[data-hl-size='sm'] {
|
|
3607
|
+
--_pad-y: var(--hl-space-1);
|
|
3608
|
+
--_pad-x: var(--hl-space-2);
|
|
3609
|
+
|
|
3610
|
+
font-size: var(--hl-text-xs);
|
|
3553
3611
|
}
|
|
3554
|
-
}
|
|
3555
3612
|
|
|
3556
|
-
.hl-table
|
|
3557
|
-
|
|
3558
|
-
|
|
3613
|
+
.hl-table[data-hl-size='lg'] {
|
|
3614
|
+
--_pad-y: var(--hl-space-3);
|
|
3615
|
+
--_pad-x: var(--hl-space-4);
|
|
3616
|
+
|
|
3617
|
+
font-size: var(--hl-text-base);
|
|
3618
|
+
}
|
|
3619
|
+
|
|
3620
|
+
.hl-table[data-hl-align='start'] :is(th, td),
|
|
3621
|
+
.hl-table :is(th, td)[data-hl-align='start'] {
|
|
3622
|
+
text-align: start;
|
|
3559
3623
|
}
|
|
3560
3624
|
|
|
3561
|
-
.hl-table
|
|
3562
|
-
.hl-table th[data-hl-align='center'] {
|
|
3625
|
+
.hl-table[data-hl-align='center'] :is(th, td),
|
|
3626
|
+
.hl-table :is(th, td)[data-hl-align='center'] {
|
|
3563
3627
|
text-align: center;
|
|
3564
3628
|
}
|
|
3629
|
+
|
|
3630
|
+
.hl-table[data-hl-align='end'] :is(th, td),
|
|
3631
|
+
.hl-table :is(th, td)[data-hl-align='end'] {
|
|
3632
|
+
text-align: end;
|
|
3633
|
+
}
|
|
3634
|
+
|
|
3635
|
+
@media (forced-colors: active) {
|
|
3636
|
+
.hl-table[data-hl-hover] tbody tr:hover {
|
|
3637
|
+
background: Highlight;
|
|
3638
|
+
color: HighlightText;
|
|
3639
|
+
}
|
|
3640
|
+
}
|
|
3565
3641
|
}
|
|
3566
3642
|
|
|
3567
3643
|
/* Navigation utilities */
|
|
3568
3644
|
|
|
3645
|
+
/**
|
|
3646
|
+
* Skip link: `<a class="hl-skip-link" href="#main">Skip to content</a>` placed
|
|
3647
|
+
* first in the body. Visually hidden until it receives keyboard focus, then
|
|
3648
|
+
* pinned to the start corner of the viewport. Pure CSS; there is no enhancer.
|
|
3649
|
+
*/
|
|
3650
|
+
|
|
3569
3651
|
@layer components {
|
|
3570
3652
|
.hl-skip-link {
|
|
3571
3653
|
position: absolute;
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3654
|
+
inset-inline-start: -9999px;
|
|
3655
|
+
inset-block-start: auto;
|
|
3656
|
+
inline-size: 1px;
|
|
3657
|
+
block-size: 1px;
|
|
3576
3658
|
overflow: hidden;
|
|
3577
3659
|
}
|
|
3578
3660
|
|
|
3579
3661
|
.hl-skip-link:focus-visible {
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
padding: 0.5rem 0.75rem;
|
|
3662
|
+
inset-inline-start: 0;
|
|
3663
|
+
inset-block-start: 0;
|
|
3664
|
+
inline-size: auto;
|
|
3665
|
+
block-size: auto;
|
|
3585
3666
|
padding: var(--hl-space-2) var(--hl-space-3);
|
|
3586
|
-
background: hsl(222, 47%, 11%);
|
|
3587
3667
|
background: var(--hl-fg);
|
|
3588
|
-
color: hsl(0, 0%, 100%);
|
|
3589
3668
|
color: var(--hl-surface);
|
|
3590
|
-
border-radius: 0.25rem;
|
|
3591
3669
|
border-radius: var(--hl-radius-sm);
|
|
3592
|
-
outline: 2px solid hsl(217, 91%, 60%);
|
|
3593
3670
|
outline: var(--hl-focus-ring);
|
|
3594
3671
|
}
|
|
3595
3672
|
}
|