hydrateless 0.8.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.
Files changed (45) hide show
  1. package/README.md +120 -0
  2. package/dist/accordion.css +20 -8
  3. package/dist/alert.css +15 -7
  4. package/dist/avatar.css +8 -14
  5. package/dist/badge.css +9 -1
  6. package/dist/breadcrumb.css +7 -3
  7. package/dist/button.css +48 -28
  8. package/dist/card.css +8 -5
  9. package/dist/checkbox.css +31 -22
  10. package/dist/combobox.css +43 -15
  11. package/dist/command-palette.css +123 -0
  12. package/dist/components.css +1103 -566
  13. package/dist/disclosure.css +27 -29
  14. package/dist/drawer.css +76 -48
  15. package/dist/dropdown.css +82 -22
  16. package/dist/field.css +5 -4
  17. package/dist/hydrateless.css +1333 -1321
  18. package/dist/hydrateless.min.css +1 -1
  19. package/dist/input.css +20 -17
  20. package/dist/kbd.css +4 -3
  21. package/dist/menu.css +91 -45
  22. package/dist/modal.css +63 -14
  23. package/dist/pagination.css +20 -11
  24. package/dist/popover.css +34 -12
  25. package/dist/progress.css +23 -12
  26. package/dist/{radio.css → radio-group.css} +23 -16
  27. package/dist/reset.css +7 -2
  28. package/dist/{segmented.css → segmented-control.css} +21 -10
  29. package/dist/select.css +28 -22
  30. package/dist/separator.css +9 -9
  31. package/dist/skeleton.css +18 -10
  32. package/dist/skip-link.css +13 -8
  33. package/dist/slider.css +28 -25
  34. package/dist/spinner.css +17 -14
  35. package/dist/switch.css +55 -18
  36. package/dist/table.css +52 -15
  37. package/dist/tabs.css +35 -11
  38. package/dist/textarea.css +26 -12
  39. package/dist/theme.css +5 -24
  40. package/dist/toast.css +40 -36
  41. package/dist/toc.css +17 -4
  42. package/dist/tokens.css +208 -179
  43. package/dist/tooltip.css +45 -15
  44. package/package.json +4 -4
  45. package/dist/command.css +0 -102
package/dist/modal.css CHANGED
@@ -1,35 +1,84 @@
1
+ /**
2
+ * Modal: a native `<dialog class="hl-modal">` (or `<dialog data-hl-modal>`)
3
+ * with optional `.hl-modal-header`, `.hl-modal-body`, and `.hl-modal-footer`.
4
+ *
5
+ * No-JS baseline: `<button command="show-modal" commandfor="id">` opens it and
6
+ * `command="close"` closes it; Escape and the backdrop are native. The
7
+ * enhancer only adds focus return, backdrop dismiss, and the open API, and
8
+ * reads nothing beyond `data-hl-modal`.
9
+ */
1
10
  @layer components {
2
- .hl-modal {
11
+ :is(.hl-modal, dialog[data-hl-modal]) {
12
+ inline-size: min(90vi, var(--hl-modal-inline-size));
13
+ max-inline-size: none;
14
+ padding: 0;
3
15
  border: none;
4
16
  border-radius: var(--hl-radius-lg);
5
- padding: 0;
6
- max-width: min(90vw, 640px);
7
- width: 100%;
8
17
  background: var(--hl-surface);
9
18
  color: var(--hl-fg);
10
19
  box-shadow: var(--hl-overlay-shadow);
20
+ transition:
21
+ opacity var(--hl-duration-base) var(--hl-ease-standard),
22
+ translate var(--hl-duration-base) var(--hl-ease-standard),
23
+ display var(--hl-duration-base) allow-discrete,
24
+ overlay var(--hl-duration-base) allow-discrete;
25
+ }
26
+
27
+ /* Closed state doubles as the exit target of the transition. */
28
+ :is(.hl-modal, dialog[data-hl-modal]):not([open]) {
29
+ opacity: 0;
30
+ translate: 0 var(--hl-space-2);
31
+ }
32
+
33
+ @starting-style {
34
+ :is(.hl-modal, dialog[data-hl-modal])[open] {
35
+ opacity: 0;
36
+ translate: 0 var(--hl-space-2);
37
+ }
11
38
  }
12
39
 
13
- .hl-modal::backdrop {
40
+ :is(.hl-modal, dialog[data-hl-modal])::backdrop {
14
41
  background: var(--hl-scrim);
42
+ opacity: 0;
43
+ transition:
44
+ opacity var(--hl-duration-base) var(--hl-ease-standard),
45
+ display var(--hl-duration-base) allow-discrete,
46
+ overlay var(--hl-duration-base) allow-discrete;
15
47
  }
16
48
 
17
- .hl-modal .hl-modal-header,
18
- .hl-modal .hl-modal-body,
19
- .hl-modal .hl-modal-footer {
49
+ :is(.hl-modal, dialog[data-hl-modal])[open]::backdrop {
50
+ opacity: 1;
51
+ }
52
+
53
+ @starting-style {
54
+ :is(.hl-modal, dialog[data-hl-modal])[open]::backdrop {
55
+ opacity: 0;
56
+ }
57
+ }
58
+
59
+ :is(.hl-modal, dialog[data-hl-modal]) :is(.hl-modal-header, .hl-modal-body, .hl-modal-footer) {
20
60
  padding: var(--hl-space-4);
21
61
  }
22
62
 
23
- .hl-modal .hl-modal-header {
24
- border-bottom: 1px solid var(--hl-border);
63
+ :is(.hl-modal, dialog[data-hl-modal]) .hl-modal-header {
64
+ border-block-end: var(--hl-border-width) solid var(--hl-border);
25
65
  }
26
66
 
27
- .hl-modal .hl-modal-footer {
28
- border-top: 1px solid var(--hl-border);
67
+ :is(.hl-modal, dialog[data-hl-modal]) .hl-modal-footer {
68
+ border-block-start: var(--hl-border-width) solid var(--hl-border);
29
69
  }
30
70
 
31
- .hl-modal [command='close']:focus-visible {
71
+ /* Interactive children inside the dialog get the standard ring. */
72
+ :is(.hl-modal, dialog[data-hl-modal])
73
+ :is(a, button, input, select, textarea, [tabindex]):focus-visible {
32
74
  outline: var(--hl-focus-ring);
33
- outline-offset: 2px;
75
+ outline-offset: var(--hl-focus-offset);
76
+ }
77
+
78
+ /* The dialog loses its shadow in forced colors; a border keeps its edge. */
79
+ @media (forced-colors: active) {
80
+ :is(.hl-modal, dialog[data-hl-modal]) {
81
+ border: var(--hl-border-width) solid CanvasText;
82
+ }
34
83
  }
35
84
  }
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Pagination: `<nav class="hl-pagination" aria-label="Pagination">` wrapping a
3
3
  * list of `.hl-pagination-item` links/buttons; mark the active page with
4
- * `aria-current="page"` and use `.hl-pagination-ellipsis` for gaps.
4
+ * `aria-current="page"` and use `.hl-pagination-ellipsis` for gaps. Pure CSS;
5
+ * there is no enhancer. Item order follows the writing direction.
5
6
  */
6
7
  @layer components {
7
8
  .hl-pagination ul {
@@ -19,17 +20,15 @@
19
20
  align-items: center;
20
21
  justify-content: center;
21
22
  gap: var(--hl-space-1);
22
- min-width: 2.25rem;
23
- height: 2.25rem;
24
- padding-left: var(--hl-space-2);
25
- padding-right: var(--hl-space-2);
23
+ min-inline-size: var(--hl-control-block-size);
24
+ block-size: var(--hl-control-block-size);
25
+ padding-inline: var(--hl-space-2);
26
26
  border: var(--hl-border-width) solid transparent;
27
27
  border-radius: var(--hl-radius-md);
28
28
  background: transparent;
29
29
  color: var(--hl-fg);
30
30
  font: inherit;
31
31
  font-size: var(--hl-text-sm);
32
- -webkit-text-decoration: none;
33
32
  text-decoration: none;
34
33
  cursor: pointer;
35
34
  transition: background-color var(--hl-duration-fast) var(--hl-ease-standard);
@@ -41,7 +40,7 @@
41
40
 
42
41
  .hl-pagination-item:focus-visible {
43
42
  outline: var(--hl-focus-ring);
44
- outline-offset: 2px;
43
+ outline-offset: var(--hl-focus-offset);
45
44
  }
46
45
 
47
46
  .hl-pagination-item[aria-current='page'] {
@@ -52,7 +51,7 @@
52
51
 
53
52
  .hl-pagination-item[aria-disabled='true'],
54
53
  .hl-pagination-item:disabled {
55
- opacity: 0.45;
54
+ opacity: var(--hl-disabled-opacity);
56
55
  pointer-events: none;
57
56
  }
58
57
 
@@ -60,11 +59,21 @@
60
59
  display: inline-flex;
61
60
  align-items: center;
62
61
  justify-content: center;
63
- min-width: 2.25rem;
64
- height: 2.25rem;
62
+ min-inline-size: var(--hl-control-block-size);
63
+ block-size: var(--hl-control-block-size);
65
64
  color: var(--hl-fg-subtle);
66
65
  -webkit-user-select: none;
67
- -moz-user-select: none;
68
66
  user-select: none;
69
67
  }
68
+
69
+ @media (forced-colors: active) {
70
+ .hl-pagination-item[aria-current='page'] {
71
+ border-color: Highlight;
72
+ }
73
+
74
+ .hl-pagination-item[aria-disabled='true'],
75
+ .hl-pagination-item:disabled {
76
+ color: GrayText;
77
+ }
78
+ }
70
79
  }
package/dist/popover.css CHANGED
@@ -1,22 +1,29 @@
1
1
  /**
2
2
  * Popover: a `[popover] [data-hl-popover]` surface opened by a
3
- * `<button popovertarget="…">` (or `command="toggle-popover"`). The browser
4
- * owns the top layer, light-dismiss, and Escape with no JavaScript; the
5
- * enhancer only mirrors `aria-expanded`, adds optional hover, and runs the JS
6
- * positioning fallback on engines without CSS anchor positioning.
3
+ * `<button popovertarget="...">` (or `command="toggle-popover"`).
4
+ *
5
+ * No-JS baseline: the browser owns the top layer, light dismiss, and Escape,
6
+ * so the popover is fully usable with `popover` and `popovertarget` in the
7
+ * markup. The enhancer only mirrors `aria-expanded`, adds optional hover, and
8
+ * runs the JS positioning fallback on engines without CSS anchor positioning.
9
+ * data-hl-popover: the surface (opts into the enhancer)
7
10
  */
8
11
  @layer components {
9
12
  [data-hl-popover] {
10
13
  margin: 0;
11
- width: -moz-max-content;
12
- width: max-content;
13
- max-width: min(92vw, 22rem);
14
+ inline-size: max-content;
15
+ max-inline-size: min(92vi, 22rem);
14
16
  border: var(--hl-border-width) solid var(--hl-border);
15
17
  border-radius: var(--hl-radius-lg);
16
18
  padding: var(--hl-space-3);
17
19
  background: var(--hl-surface);
18
20
  color: var(--hl-fg);
19
21
  box-shadow: var(--hl-overlay-shadow);
22
+ transition:
23
+ opacity var(--hl-duration-fast) var(--hl-ease-standard),
24
+ translate var(--hl-duration-fast) var(--hl-ease-standard),
25
+ display var(--hl-duration-fast) allow-discrete,
26
+ overlay var(--hl-duration-fast) allow-discrete;
20
27
  }
21
28
 
22
29
  /* Until the `popover` attribute is present (author omitted it and JS hasn't
@@ -25,10 +32,21 @@
25
32
  display: none;
26
33
  }
27
34
 
28
- /* Engines without the Popover API can't promote it to the top layer, so the
29
- JS fallback positions it; give it a stacking context to land above content. */
35
+ /* Closed state and exit target. Engines without the Popover API can't
36
+ promote it to the top layer, so the JS fallback positions it; the z-index
37
+ lands it above content. Those engines drop this rule, so nothing is
38
+ hidden by accident. */
30
39
  [data-hl-popover]:not(:popover-open) {
31
40
  z-index: var(--hl-z-popover);
41
+ opacity: 0;
42
+ translate: 0 -0.25rem;
43
+ }
44
+
45
+ @starting-style {
46
+ [data-hl-popover]:popover-open {
47
+ opacity: 0;
48
+ translate: 0 -0.25rem;
49
+ }
32
50
  }
33
51
 
34
52
  /* Modern placement: anchor to the invoking control (the popover's implicit
@@ -37,11 +55,15 @@
37
55
  @supports (position-area: block-end) {
38
56
  [data-hl-popover] {
39
57
  position: fixed;
40
- inset-area: block-end;
41
58
  position-area: block-end;
42
59
  position-try-fallbacks: flip-block, flip-inline;
43
- margin-top: var(--hl-space-1);
44
- margin-bottom: var(--hl-space-1);
60
+ margin-block: var(--hl-space-1);
45
61
  }
46
62
  }
63
+
64
+ /* Interactive children inside the surface get the standard ring. */
65
+ [data-hl-popover] :is(a, button, input, select, textarea, [tabindex]):focus-visible {
66
+ outline: var(--hl-focus-ring);
67
+ outline-offset: var(--hl-focus-offset);
68
+ }
47
69
  }
package/dist/progress.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Progress: native `<progress class="hl-progress" value max>`. Omit `value`
3
- * for an indeterminate bar.
3
+ * for an indeterminate bar. Pure CSS; there is no enhancer.
4
4
  * data-hl-intent: primary (default) | success | warning | danger | info
5
5
  * data-hl-size: sm | md (default) | lg
6
6
  */
@@ -9,14 +9,9 @@
9
9
  --_color: var(--hl-primary);
10
10
  --_height: 0.5rem;
11
11
 
12
- -webkit-appearance: none;
13
-
14
- -moz-appearance: none;
15
-
16
- appearance: none;
17
- width: 100%;
18
- height: 0.5rem;
19
- height: var(--_height);
12
+ appearance: none;
13
+ inline-size: 100%;
14
+ block-size: var(--_height);
20
15
  border: 0;
21
16
  border-radius: var(--hl-radius-full);
22
17
  overflow: hidden;
@@ -55,8 +50,8 @@
55
50
  .hl-progress::-webkit-progress-value {
56
51
  background: var(--_color);
57
52
  border-radius: var(--hl-radius-full);
58
- -webkit-transition: width var(--hl-duration-base) var(--hl-ease-standard);
59
- transition: width var(--hl-duration-base) var(--hl-ease-standard);
53
+ -webkit-transition: inline-size var(--hl-duration-base) var(--hl-ease-standard);
54
+ transition: inline-size var(--hl-duration-base) var(--hl-ease-standard);
60
55
  }
61
56
 
62
57
  .hl-progress::-moz-progress-bar {
@@ -86,9 +81,25 @@
86
81
  }
87
82
  }
88
83
 
84
+ /* A static partial bar still signals "in progress" without motion. */
89
85
  @media (prefers-reduced-motion: reduce) {
90
86
  .hl-progress:indeterminate {
91
- animation-duration: 3s;
87
+ animation: none;
88
+ background-position: 30% 0;
89
+ }
90
+ }
91
+
92
+ @media (forced-colors: active) {
93
+ .hl-progress {
94
+ border: var(--hl-border-width) solid CanvasText;
95
+ }
96
+
97
+ .hl-progress::-webkit-progress-value {
98
+ background: Highlight;
99
+ }
100
+
101
+ .hl-progress::-moz-progress-bar {
102
+ background: Highlight;
92
103
  }
93
104
  }
94
105
  }
@@ -1,6 +1,9 @@
1
1
  /**
2
- * Radio: `<label class="hl-radio"><input type="radio"><span>…</span></label>`,
3
- * grouped in `<div class="hl-radio-group" role="radiogroup">`.
2
+ * Radio group: `<label class="hl-radio"><input type="radio"><span>...</span></label>`
3
+ * items grouped in `<div class="hl-radio-group" role="radiogroup">`. Native
4
+ * radios provide selection and arrow-key movement; pure CSS, there is no
5
+ * enhancer.
6
+ * data-hl-orientation: vertical (default) | horizontal (on the group)
4
7
  */
5
8
  @layer components {
6
9
  .hl-radio-group {
@@ -25,19 +28,15 @@
25
28
  }
26
29
 
27
30
  .hl-radio > input[type='radio'] {
28
- -webkit-appearance: none;
29
- -moz-appearance: none;
30
- appearance: none;
31
+ appearance: none;
31
32
  flex: none;
32
- width: 1.15rem;
33
- height: 1.15rem;
33
+ inline-size: 1.15rem;
34
+ block-size: 1.15rem;
34
35
  margin: 0;
35
36
  border: var(--hl-border-width-2) solid var(--hl-border-strong);
36
37
  border-radius: var(--hl-radius-full);
37
38
  background: var(--hl-surface);
38
39
  display: grid;
39
- align-content: center;
40
- justify-content: center;
41
40
  place-content: center;
42
41
  cursor: pointer;
43
42
  transition: border-color var(--hl-duration-fast) var(--hl-ease-standard);
@@ -45,12 +44,12 @@
45
44
 
46
45
  .hl-radio > input[type='radio']::after {
47
46
  content: '';
48
- width: 0.6rem;
49
- height: 0.6rem;
47
+ inline-size: 0.6rem;
48
+ block-size: 0.6rem;
50
49
  border-radius: var(--hl-radius-full);
51
50
  background: var(--hl-primary);
52
- transform: scale(0);
53
- transition: transform var(--hl-duration-fast) var(--hl-ease-emphasized);
51
+ scale: 0;
52
+ transition: scale var(--hl-duration-fast) var(--hl-ease-emphasized);
54
53
  }
55
54
 
56
55
  .hl-radio > input[type='radio']:checked {
@@ -58,21 +57,29 @@
58
57
  }
59
58
 
60
59
  .hl-radio > input[type='radio']:checked::after {
61
- transform: scale(1);
60
+ scale: 1;
62
61
  }
63
62
 
64
63
  .hl-radio > input[type='radio']:focus-visible {
65
64
  outline: var(--hl-focus-ring);
66
- outline-offset: 2px;
65
+ outline-offset: var(--hl-focus-offset);
67
66
  }
68
67
 
69
68
  .hl-radio > input[type='radio']:disabled {
70
69
  cursor: not-allowed;
71
- opacity: 0.55;
70
+ opacity: var(--hl-disabled-opacity);
72
71
  }
73
72
 
74
73
  .hl-radio:has(> input:disabled) {
75
74
  cursor: not-allowed;
76
75
  color: var(--hl-fg-subtle);
77
76
  }
77
+
78
+ /* The dot is custom-drawn, so it opts out of forced-color flattening. */
79
+ @media (forced-colors: active) {
80
+ .hl-radio > input[type='radio']::after {
81
+ forced-color-adjust: none;
82
+ background: Highlight;
83
+ }
84
+ }
78
85
  }
package/dist/reset.css CHANGED
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Reset: a minimal, opinion-light baseline (border-box sizing, no default
3
+ * margins, inherited form typography). Lives in the lowest layer so any
4
+ * component or author rule wins without specificity games.
5
+ */
1
6
  @layer reset {
2
7
  *,
3
8
  *::before,
@@ -21,7 +26,7 @@
21
26
 
22
27
  html,
23
28
  body {
24
- height: 100%;
29
+ block-size: 100%;
25
30
  }
26
31
 
27
32
  body {
@@ -35,7 +40,7 @@
35
40
  canvas,
36
41
  svg {
37
42
  display: block;
38
- max-width: 100%;
43
+ max-inline-size: 100%;
39
44
  }
40
45
 
41
46
  input,
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * Segmented control: `<div class="hl-segmented" role="radiogroup">` of
3
- * `<label class="hl-segmented-item"><input type="radio">…</label>` segments.
3
+ * `<label class="hl-segmented-item"><input type="radio">...</label>` segments.
4
4
  * Radio inputs give free keyboard navigation; the checked segment is raised.
5
- * A button variant using `aria-pressed="true"` is also supported.
5
+ * A button variant using `aria-pressed="true"` is also supported. Pure CSS;
6
+ * there is no enhancer.
6
7
  * data-hl-size: sm | md (default) | lg
7
8
  */
8
9
  @layer components {
@@ -33,18 +34,15 @@
33
34
  white-space: nowrap;
34
35
  cursor: pointer;
35
36
  -webkit-user-select: none;
36
- -moz-user-select: none;
37
37
  user-select: none;
38
38
  transition:
39
- background-color var(--hl-duration-fast) var(--hl-ease-standard), color var(--hl-duration-fast) var(--hl-ease-standard);
39
+ background-color var(--hl-duration-fast) var(--hl-ease-standard),
40
+ color var(--hl-duration-fast) var(--hl-ease-standard);
40
41
  }
41
42
 
42
43
  .hl-segmented-item > input {
43
44
  position: absolute;
44
- top: 0;
45
- right: 0;
46
- bottom: 0;
47
- left: 0;
45
+ inset: 0;
48
46
  margin: 0;
49
47
  opacity: 0;
50
48
  cursor: pointer;
@@ -64,12 +62,12 @@
64
62
  .hl-segmented-item:has(input:focus-visible),
65
63
  .hl-segmented-item[aria-pressed]:focus-visible {
66
64
  outline: var(--hl-focus-ring);
67
- outline-offset: 2px;
65
+ outline-offset: var(--hl-focus-offset);
68
66
  }
69
67
 
70
68
  .hl-segmented-item:has(input:disabled),
71
69
  .hl-segmented-item:disabled {
72
- opacity: 0.5;
70
+ opacity: var(--hl-disabled-opacity);
73
71
  cursor: not-allowed;
74
72
  }
75
73
 
@@ -82,4 +80,17 @@
82
80
  padding: var(--hl-space-2) var(--hl-space-4);
83
81
  font-size: var(--hl-text-base);
84
82
  }
83
+
84
+ /* The raised segment relies on a shadow, which forced colors remove. */
85
+ @media (forced-colors: active) {
86
+ .hl-segmented-item {
87
+ border: var(--hl-border-width) solid ButtonBorder;
88
+ }
89
+
90
+ .hl-segmented-item:has(input:checked),
91
+ .hl-segmented-item[aria-pressed='true'] {
92
+ background: Highlight;
93
+ color: HighlightText;
94
+ }
95
+ }
85
96
  }
package/dist/select.css CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Native select: `<span class="hl-select-wrapper"><select class="hl-select">`.
3
3
  * The wrapper draws a custom caret while the native control keeps full
4
- * keyboard/mobile behavior.
4
+ * keyboard and mobile behavior. Pure CSS; there is no enhancer.
5
5
  * data-hl-size: sm | md (default) | lg
6
6
  * data-hl-invalid: error styling (pair with aria-invalid)
7
7
  */
@@ -9,19 +9,22 @@
9
9
  .hl-select-wrapper {
10
10
  position: relative;
11
11
  display: inline-flex;
12
- width: 100%;
12
+ inline-size: 100%;
13
13
  }
14
14
 
15
+ /* The caret is a rotated square corner; it sits at the inline end so it
16
+ moves to the left under RTL along with the select's end padding. */
15
17
  .hl-select-wrapper::after {
16
18
  content: '';
17
19
  position: absolute;
18
- top: 50%;
19
- right: var(--hl-space-3);
20
- width: 0.5rem;
21
- height: 0.5rem;
22
- border-right: 2px solid var(--hl-fg-muted);
23
- border-bottom: 2px solid var(--hl-fg-muted);
24
- transform: translateY(-65%) rotate(45deg);
20
+ inset-block-start: 50%;
21
+ inset-inline-end: var(--hl-space-3);
22
+ inline-size: 0.5rem;
23
+ block-size: 0.5rem;
24
+ border-inline-end: 2px solid var(--hl-fg-muted);
25
+ border-block-end: 2px solid var(--hl-fg-muted);
26
+ translate: 0 -65%;
27
+ rotate: 45deg;
25
28
  pointer-events: none;
26
29
  }
27
30
 
@@ -29,15 +32,10 @@
29
32
  --_height: var(--hl-control-height-md);
30
33
  --_font: var(--hl-text-sm);
31
34
 
32
- -webkit-appearance: none;
33
-
34
- -moz-appearance: none;
35
-
36
- appearance: none;
37
- width: 100%;
38
- height: var(--_height);
39
- padding-left: var(--hl-space-3);
40
- padding-right: var(--hl-space-8);
35
+ appearance: none;
36
+ inline-size: 100%;
37
+ block-size: var(--_height);
38
+ padding-inline: var(--hl-space-3) var(--hl-space-8);
41
39
  border: var(--hl-border-width) solid var(--hl-border-strong);
42
40
  border-radius: var(--hl-radius-md);
43
41
  background: var(--hl-surface);
@@ -47,22 +45,23 @@
47
45
  line-height: var(--hl-leading-normal);
48
46
  cursor: pointer;
49
47
  transition:
50
- border-color var(--hl-duration-fast) var(--hl-ease-standard), box-shadow var(--hl-duration-fast) var(--hl-ease-standard);
48
+ border-color var(--hl-duration-fast) var(--hl-ease-standard),
49
+ box-shadow var(--hl-duration-fast) var(--hl-ease-standard);
51
50
  }
52
51
 
53
- .hl-select:hover:not(:disabled):not(:focus) {
52
+ .hl-select:hover:not(:disabled, :focus) {
54
53
  border-color: var(--hl-fg-subtle);
55
54
  }
56
55
 
57
56
  .hl-select:focus-visible {
58
57
  outline: none;
59
58
  border-color: var(--hl-ring);
60
- box-shadow: 0 0 0 3px color-mix(in oklab, var(--hl-ring) 30%, transparent);
59
+ box-shadow: var(--hl-focus-shadow);
61
60
  }
62
61
 
63
62
  .hl-select:disabled {
64
63
  cursor: not-allowed;
65
- opacity: 0.6;
64
+ opacity: var(--hl-disabled-opacity);
66
65
  background: var(--hl-surface-2);
67
66
  }
68
67
 
@@ -82,4 +81,11 @@
82
81
  --_height: var(--hl-control-height-lg);
83
82
  --_font: var(--hl-text-base);
84
83
  }
84
+
85
+ @media (forced-colors: active) {
86
+ .hl-select:focus-visible {
87
+ outline: var(--hl-focus-ring);
88
+ outline-offset: var(--hl-focus-offset);
89
+ }
90
+ }
85
91
  }
@@ -1,6 +1,8 @@
1
1
  /**
2
2
  * Separator: `<hr class="hl-separator">` or
3
3
  * `<div class="hl-separator" role="separator" aria-orientation="vertical">`.
4
+ * Pure CSS; there is no enhancer.
5
+ * data-hl-orientation: vertical (alternative to aria-orientation)
4
6
  */
5
7
  @layer components {
6
8
  .hl-separator {
@@ -9,19 +11,17 @@
9
11
  background: var(--hl-border);
10
12
  }
11
13
 
12
- .hl-separator:not([aria-orientation='vertical']):not([data-hl-orientation='vertical']) {
13
- width: 100%;
14
- height: var(--hl-border-width);
15
- margin-top: var(--hl-space-4);
16
- margin-bottom: var(--hl-space-4);
14
+ .hl-separator:not([aria-orientation='vertical'], [data-hl-orientation='vertical']) {
15
+ inline-size: 100%;
16
+ block-size: var(--hl-border-width);
17
+ margin-block: var(--hl-space-4);
17
18
  }
18
19
 
19
20
  .hl-separator[aria-orientation='vertical'],
20
21
  .hl-separator[data-hl-orientation='vertical'] {
21
22
  align-self: stretch;
22
- width: var(--hl-border-width);
23
- min-height: 1rem;
24
- margin-left: var(--hl-space-4);
25
- margin-right: var(--hl-space-4);
23
+ inline-size: var(--hl-border-width);
24
+ min-block-size: 1rem;
25
+ margin-inline: var(--hl-space-4);
26
26
  }
27
27
  }
package/dist/skeleton.css CHANGED
@@ -1,13 +1,14 @@
1
1
  /**
2
- * Skeleton: `<span class="hl-skeleton" data-hl-variant="…" aria-hidden="true">`
3
- * placeholder shown while content loads.
4
- * data-hl-variant: rect (default) | text | circle
2
+ * Skeleton: `<span class="hl-skeleton" data-hl-shape="..." aria-hidden="true">`
3
+ * placeholder shown while content loads. Pure CSS; there is no enhancer.
4
+ * Size it with inline `inline-size`/`block-size`.
5
+ * data-hl-shape: rect (default) | text | circle
5
6
  */
6
7
  @layer components {
7
8
  .hl-skeleton {
8
9
  display: block;
9
- width: 100%;
10
- height: 1rem;
10
+ inline-size: 100%;
11
+ block-size: 1rem;
11
12
  border-radius: var(--hl-radius-md);
12
13
  background: linear-gradient(
13
14
  90deg,
@@ -19,14 +20,14 @@
19
20
  animation: hl-skeleton-shimmer 1.4s var(--hl-ease-standard) infinite;
20
21
  }
21
22
 
22
- .hl-skeleton[data-hl-variant='text'] {
23
- height: 0.7em;
23
+ .hl-skeleton[data-hl-shape='text'] {
24
+ block-size: 0.7em;
24
25
  border-radius: var(--hl-radius-sm);
25
26
  }
26
27
 
27
- .hl-skeleton[data-hl-variant='circle'] {
28
- width: 2.5rem;
29
- height: 2.5rem;
28
+ .hl-skeleton[data-hl-shape='circle'] {
29
+ inline-size: 2.5rem;
30
+ block-size: 2.5rem;
30
31
  border-radius: var(--hl-radius-full);
31
32
  }
32
33
 
@@ -46,4 +47,11 @@
46
47
  background: var(--hl-surface-3);
47
48
  }
48
49
  }
50
+
51
+ /* Fills flatten to Canvas in forced colors; outline the placeholder instead. */
52
+ @media (forced-colors: active) {
53
+ .hl-skeleton {
54
+ border: var(--hl-border-width) solid GrayText;
55
+ }
56
+ }
49
57
  }