@slotted/styles 0.1.0-beta.29 → 0.1.0-beta.30
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/package.json +11 -1
- package/src/accordion/accordion.css +1 -1
- package/src/action-bar/action-bar.css +2 -2
- package/src/action-sheet/action-sheet.css +3 -3
- package/src/alert/alert.css +31 -32
- package/src/app-shell/app-shell.css +20 -20
- package/src/attachment/attachment.css +14 -14
- package/src/avatar/avatar.css +25 -25
- package/src/avatar-group/avatar-group.css +1 -1
- package/src/badge/badge.css +9 -9
- package/src/breadcrumb/breadcrumb.css +15 -15
- package/src/button/button.css +20 -20
- package/src/button-group/button-group.css +4 -4
- package/src/calendar/calendar.css +7 -7
- package/src/card/card.css +4 -4
- package/src/carousel/carousel.css +8 -8
- package/src/cascader/cascader.css +4 -4
- package/src/chart/chart.css +16 -16
- package/src/checkbox/checkbox.css +24 -24
- package/src/code-block/code-block.css +4 -4
- package/src/collapsible/collapsible.css +5 -5
- package/src/color-picker/color-picker.css +23 -23
- package/src/column-manager/column-manager.css +5 -5
- package/src/combobox/combobox.css +6 -6
- package/src/command-palette/command-palette.css +12 -12
- package/src/container/container.css +3 -3
- package/src/context-menu/context-menu.css +1 -1
- package/src/currency-field/currency-field.css +13 -13
- package/src/dashboard-grid/dashboard-grid.css +1 -1
- package/src/data-grid/data-grid.css +15 -15
- package/src/data-list/data-list.css +1 -1
- package/src/date-field/date-field.css +5 -5
- package/src/date-picker/date-picker.css +2 -2
- package/src/date-range-picker/date-range-picker.css +9 -10
- package/src/datetime-field/datetime-field.css +10 -10
- package/src/datetime-picker/datetime-picker.css +5 -5
- package/src/datetime-range-picker/datetime-range-picker.css +8 -8
- package/src/description-list/description-list.css +5 -5
- package/src/detail-panel/detail-panel.css +1 -1
- package/src/dialog/dialog.css +15 -15
- package/src/divider/divider.css +2 -2
- package/src/drawer/drawer.css +20 -20
- package/src/entity-picker/entity-picker.css +15 -15
- package/src/event-calendar/event-calendar.css +14 -14
- package/src/field/field.css +14 -14
- package/src/field-group/field-group.css +1 -2
- package/src/filter-bar/filter-bar.css +7 -7
- package/src/form/form.css +1 -1
- package/src/fullscreen/fullscreen.css +2 -2
- package/src/grid/grid.css +1 -1
- package/src/highlight/highlight.css +5 -5
- package/src/hover-card/hover-card.css +3 -3
- package/src/icon/icon.css +5 -5
- package/src/image/image.css +3 -3
- package/src/import-export-center/import-export-center.css +9 -9
- package/src/inline/inline.css +1 -1
- package/src/inline-message/inline-message.css +15 -15
- package/src/kbd/kbd.css +14 -14
- package/src/link/link.css +18 -18
- package/src/list/list.css +3 -3
- package/src/list-item/list-item.css +9 -9
- package/src/listbox/listbox.css +10 -10
- package/src/loading-overlay/loading-overlay.css +11 -11
- package/src/markdown/markdown.css +3 -3
- package/src/media-viewer/media-viewer.css +8 -8
- package/src/menu/menu.css +7 -7
- package/src/menubar/menubar.css +3 -3
- package/src/message/message.css +13 -13
- package/src/message-scroller/message-scroller.css +1 -1
- package/src/multi-select/multi-select.css +11 -11
- package/src/navigation-menu/navigation-menu.css +2 -2
- package/src/notification-center/notification-center.css +13 -13
- package/src/number-field/number-field.css +10 -10
- package/src/otp-input/otp-input.css +7 -7
- package/src/page-header/page-header.css +3 -3
- package/src/pagination/pagination.css +7 -7
- package/src/popover/popover.css +3 -3
- package/src/progress-indicator/progress-indicator.css +23 -23
- package/src/prompt-composer/prompt-composer.css +10 -10
- package/src/prose/prose.css +6 -7
- package/src/radio-group/radio-group.css +9 -9
- package/src/rating/rating.css +10 -10
- package/src/result-state/result-state.css +20 -24
- package/src/runtime-properties.mjs +6 -6
- package/src/saved-views/saved-views.css +2 -2
- package/src/scroll-area/scroll-area.css +5 -5
- package/src/section/section.css +1 -1
- package/src/segmented-control/segmented-control.css +16 -16
- package/src/select/select.css +13 -13
- package/src/side-navigation/side-navigation.css +14 -14
- package/src/skeleton/skeleton.css +10 -10
- package/src/slider/slider.css +15 -15
- package/src/sparkline/sparkline.css +13 -13
- package/src/spinner/spinner.css +1 -1
- package/src/split-button/split-button.css +4 -4
- package/src/splitter/splitter.css +12 -13
- package/src/stack/stack.css +1 -1
- package/src/stat-card/stat-card.css +3 -3
- package/src/status-indicator/status-indicator.css +22 -23
- package/src/stepper/stepper.css +20 -20
- package/src/switch/switch.css +14 -14
- package/src/table/table.css +11 -11
- package/src/table-of-contents/table-of-contents.css +3 -3
- package/src/tabs/tabs.css +8 -8
- package/src/tag/tag.css +14 -14
- package/src/tags-input/tags-input.css +6 -6
- package/src/text-field/text-field.css +13 -13
- package/src/textarea/textarea.css +5 -5
- package/src/time-field/time-field.css +8 -8
- package/src/time-picker/time-picker.css +3 -3
- package/src/time-range-picker/time-range-picker.css +8 -8
- package/src/timeline/timeline.css +26 -26
- package/src/toast/toast.css +26 -26
- package/src/toggle/toggle.css +5 -5
- package/src/toggle-group/toggle-group.css +6 -6
- package/src/toolbar/toolbar.css +3 -3
- package/src/tooltip/tooltip.css +1 -1
- package/src/top-navigation/top-navigation.css +9 -9
- package/src/tour/tour.css +13 -13
- package/src/transfer/transfer.css +4 -4
- package/src/tree/tree.css +10 -10
- package/src/typography/typography.css +2 -2
- package/src/upload/upload.css +32 -33
- package/src/wizard/wizard.css +2 -2
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
/**
|
|
67
67
|
* How long the thumb takes to cross. One step above the control's own
|
|
68
68
|
* interaction feedback, because a thing that travels needs longer than a
|
|
69
|
-
* thing that changes
|
|
69
|
+
* thing that changes color, and every value on the scale collapses to a
|
|
70
70
|
* single frame under `prefers-reduced-motion`.
|
|
71
71
|
*/
|
|
72
72
|
--_travel: var(--slotted-duration-medium);
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
* card header — by the same step, and reads as a recess in each. The edge
|
|
78
78
|
* keeps its width and is transparent by default, so the arithmetic below is
|
|
79
79
|
* the same with a theme's edge and without one. An accent track with an
|
|
80
|
-
* accent thumb edge was the first appearance: a
|
|
80
|
+
* accent thumb edge was the first appearance: a colored outline on a row
|
|
81
81
|
* of neutral controls read as an alert before it read as a choice.
|
|
82
82
|
*/
|
|
83
83
|
background: var(
|
|
@@ -247,17 +247,17 @@
|
|
|
247
247
|
* on the track, and a rule in the middle of that room says the control is
|
|
248
248
|
* divided: a track of words with nothing between them reads as a sentence.
|
|
249
249
|
*
|
|
250
|
-
* The rule is
|
|
250
|
+
* The rule is centerd in the gap rather than on a segment's edge, half the
|
|
251
251
|
* segment's height, rounded at its ends, in a light tint of the ink rather
|
|
252
|
-
* than an opaque border
|
|
252
|
+
* than an opaque border color. It gives way wherever it would touch a
|
|
253
253
|
* shape: beside the thumb, and beside the segment under the pointer, whose
|
|
254
254
|
* ground would otherwise meet it. It lies under the thumb, so a thumb that
|
|
255
255
|
* crosses it while sliding passes over it.
|
|
256
256
|
*/
|
|
257
257
|
[data-ui-segmented-control] [data-part-item] + [data-part-item]::before {
|
|
258
|
-
/* No system
|
|
258
|
+
/* No system color behind it: an unthemed decoration disappears rather
|
|
259
259
|
than shouting, which is what `fallbacks.test.mjs` holds a pseudo-element
|
|
260
|
-
to. In forced
|
|
260
|
+
to. In forced colors the thumb's own edge is what divides. */
|
|
261
261
|
background: var(
|
|
262
262
|
--slotted-segmented-control-divider-color,
|
|
263
263
|
color-mix(in oklab, var(--slotted-text) 14%, transparent)
|
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
* The movement is the one thing in this family a reader's eye follows: it
|
|
355
355
|
* says which segment was left, which a fill appearing in a new place does
|
|
356
356
|
* not. It takes a step above the control's own transition, because a thing
|
|
357
|
-
* that travels needs longer than a thing that changes
|
|
357
|
+
* that travels needs longer than a thing that changes color, and the theme
|
|
358
358
|
* collapses every step to a single frame under `prefers-reduced-motion`.
|
|
359
359
|
*
|
|
360
360
|
* The thumb is absent while nothing is checked, so the first selection fades
|
|
@@ -433,7 +433,7 @@
|
|
|
433
433
|
/**
|
|
434
434
|
* A segment that is not checked answers the pointer with a ground rather
|
|
435
435
|
* than with a shade of its own ink. Ink alone was the first attempt: with
|
|
436
|
-
* the unchecked label already at the page's own
|
|
436
|
+
* the unchecked label already at the page's own color there was nowhere
|
|
437
437
|
* darker for it to go, and a hover that changes nothing is a hover a reader
|
|
438
438
|
* cannot see. The ground is the neutral one, for the reason `button`
|
|
439
439
|
* records — a tinted hover on a row of choices reads as a row of status
|
|
@@ -470,7 +470,7 @@
|
|
|
470
470
|
/**
|
|
471
471
|
* The element holding focus is the radio, and the ring belongs around the
|
|
472
472
|
* segment. A family that moves its ring has to put out the one the browser
|
|
473
|
-
* draws where focus actually is, or it paints two rings in two
|
|
473
|
+
* draws where focus actually is, or it paints two rings in two colors —
|
|
474
474
|
* the rule `checkbox`, `switch` and `radio-group` each record.
|
|
475
475
|
*
|
|
476
476
|
* The ring is drawn *inside* the segment, with its outer edge on the
|
|
@@ -502,7 +502,7 @@
|
|
|
502
502
|
/**
|
|
503
503
|
* The ring is retargeted on the element rather than repainted in every rule
|
|
504
504
|
* that draws one, which is what `--slotted-focus-ring-color-invalid` exists
|
|
505
|
-
* for and what keeps the outline and its shadow the same
|
|
505
|
+
* for and what keeps the outline and its shadow the same color.
|
|
506
506
|
*/
|
|
507
507
|
[data-ui-segmented-control][data-part-root][data-invalid] {
|
|
508
508
|
--slotted-focus-ring-color: var(
|
|
@@ -515,7 +515,7 @@
|
|
|
515
515
|
var(--slotted-tone-danger-border, ButtonBorder)
|
|
516
516
|
);
|
|
517
517
|
/*
|
|
518
|
-
* Width as well as
|
|
518
|
+
* Width as well as color (WCAG 1.4.1), the edge `text-field` draws: in
|
|
519
519
|
* `high-contrast` the danger border is the resting edge's black. The line
|
|
520
520
|
* is a shadow inside the border, so neither the track nor a segment moves,
|
|
521
521
|
* and it takes the resting lift's place. Focus is the segment's ring, so
|
|
@@ -536,7 +536,7 @@
|
|
|
536
536
|
/* ── Read-only ────────────────────────────────────────────────────────── */
|
|
537
537
|
|
|
538
538
|
/**
|
|
539
|
-
* A read-only control keeps its
|
|
539
|
+
* A read-only control keeps its colors and loses its cursor: it is still
|
|
540
540
|
* legible, still focusable and still copyable, and it must not be mistaken
|
|
541
541
|
* for a disabled one — which is what `docs/component-features.md` §2.5 asks.
|
|
542
542
|
*/
|
|
@@ -562,7 +562,7 @@
|
|
|
562
562
|
/**
|
|
563
563
|
* A whole control that is unavailable greys its edge and its words and keeps
|
|
564
564
|
* its track. Painting the track in the disabled ground as well was the first
|
|
565
|
-
* attempt, and it made the thumb the same
|
|
565
|
+
* attempt, and it made the thumb the same color as what it sits on: the
|
|
566
566
|
* reader could no longer tell which of the three had been chosen. The track
|
|
567
567
|
* is the ground the thumb is read against, so it is the one thing that has
|
|
568
568
|
* to stay.
|
|
@@ -590,8 +590,8 @@
|
|
|
590
590
|
* ── Underline ──────────────────────────────────────────────────────────
|
|
591
591
|
*
|
|
592
592
|
* The same radio group with no track: the words alone, sized to their own
|
|
593
|
-
* width, the chosen one in the text
|
|
594
|
-
* is muted and takes the text
|
|
593
|
+
* width, the chosen one in the text color and underlined. Every other word
|
|
594
|
+
* is muted and takes the text color under the pointer. No thumb, no
|
|
595
595
|
* dividers, no ground — the underline is the mark, and it sits under the
|
|
596
596
|
* word rather than on an edge of a box (R1).
|
|
597
597
|
*/
|
|
@@ -698,7 +698,7 @@
|
|
|
698
698
|
}
|
|
699
699
|
|
|
700
700
|
/*
|
|
701
|
-
* Forced
|
|
701
|
+
* Forced colors remove every box shadow, and the edge with them. The width
|
|
702
702
|
* comes back as an outline inside the border; the
|
|
703
703
|
* ring belongs to a segment and leaves it alone.
|
|
704
704
|
*/
|
package/src/select/select.css
CHANGED
|
@@ -295,7 +295,7 @@
|
|
|
295
295
|
* the rest of its own target from a transparent halo that stands outside
|
|
296
296
|
* the chip (TG2), and the clip below would otherwise cut that halo off at
|
|
297
297
|
* the chip's edge — the press area measured 24 × 22.8 inside the trigger
|
|
298
|
-
* and 24 × 24 everywhere else. The chips stay
|
|
298
|
+
* and 24 × 24 everywhere else. The chips stay centerd in it. It is never
|
|
299
299
|
* taller than the control's own inner box, so the height of the frame is
|
|
300
300
|
* the height of a select that chose one thing.
|
|
301
301
|
*/
|
|
@@ -542,7 +542,7 @@
|
|
|
542
542
|
|
|
543
543
|
/**
|
|
544
544
|
* The one rule the theme cannot write for the family. A transparent border
|
|
545
|
-
* has no system
|
|
545
|
+
* has no system color to be remapped to, so the `plain` control would lose
|
|
546
546
|
* its only edge exactly where an edge matters most.
|
|
547
547
|
*/
|
|
548
548
|
@media (forced-colors: active) {
|
|
@@ -590,8 +590,8 @@
|
|
|
590
590
|
* see where they pressed, and the popup is already open under it.
|
|
591
591
|
*/
|
|
592
592
|
[data-ui-select][data-part-root]:has(> [data-part-trigger]:focus-visible) {
|
|
593
|
-
/* The resting shadow,
|
|
594
|
-
ink is the ring's, so the lift and the outline are one
|
|
593
|
+
/* The resting shadow, recolored: the geometry is the foundation's and the
|
|
594
|
+
ink is the ring's, so the lift and the outline are one color. */
|
|
595
595
|
box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
596
596
|
var(--slotted-focus-ring-color, Highlight);
|
|
597
597
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
@@ -624,7 +624,7 @@
|
|
|
624
624
|
* reporting an error should not stop looking wrong because it was opened.
|
|
625
625
|
* The ring is retargeted rather than repainted — every rule that draws focus
|
|
626
626
|
* reads `--slotted-focus-ring-color`, so pointing that one name at the
|
|
627
|
-
* invalid
|
|
627
|
+
* invalid color moves the outline and the shadow together.
|
|
628
628
|
*/
|
|
629
629
|
[data-ui-select][data-part-root][data-invalid] {
|
|
630
630
|
--slotted-focus-ring-color: var(
|
|
@@ -643,7 +643,7 @@
|
|
|
643
643
|
|
|
644
644
|
border-color: var(--slotted-select-invalid-border-color, var(--slotted-tone-danger-border));
|
|
645
645
|
/*
|
|
646
|
-
* Width as well as
|
|
646
|
+
* Width as well as color (WCAG 1.4.1), the edge `text-field` draws: in
|
|
647
647
|
* `high-contrast` the danger border is the resting edge's black. The line
|
|
648
648
|
* is a shadow inside the border, so neither box nor text moves, and it
|
|
649
649
|
* takes the resting lift's place.
|
|
@@ -672,7 +672,7 @@
|
|
|
672
672
|
}
|
|
673
673
|
|
|
674
674
|
/*
|
|
675
|
-
* Forced
|
|
675
|
+
* Forced colors remove every box shadow, and the edge with them. The
|
|
676
676
|
* width comes back as an outline inside the border, and a focused invalid
|
|
677
677
|
* control draws its ring double, which a valid ring is not.
|
|
678
678
|
*/
|
|
@@ -735,7 +735,7 @@
|
|
|
735
735
|
border-color: var(--slotted-select-disabled-border-color, var(--slotted-disabled-border));
|
|
736
736
|
/* Nothing a person cannot reach is lifted off the page. */
|
|
737
737
|
box-shadow: none;
|
|
738
|
-
/* Muted to the
|
|
738
|
+
/* Muted to the color the theme measures rather than faded by opacity: a
|
|
739
739
|
value nobody can read is a field nobody can check. */
|
|
740
740
|
color: var(--slotted-select-disabled-color, var(--slotted-disabled-foreground));
|
|
741
741
|
}
|
|
@@ -1354,7 +1354,7 @@
|
|
|
1354
1354
|
|
|
1355
1355
|
/**
|
|
1356
1356
|
* Chosen, which is not the same as highlighted. The check in the last column
|
|
1357
|
-
* is the primary signal — it survives forced
|
|
1357
|
+
* is the primary signal — it survives forced colors, where every tone ground
|
|
1358
1358
|
* becomes `Canvas` — and the accent ink is the secondary one, so the row a
|
|
1359
1359
|
* reader is looking for is findable at a glance in a list of forty.
|
|
1360
1360
|
*/
|
|
@@ -1442,7 +1442,7 @@
|
|
|
1442
1442
|
* not a given option fills it.
|
|
1443
1443
|
*
|
|
1444
1444
|
* The box holds content and paints none: a `Glyph` in an `Icon` box, or
|
|
1445
|
-
* artwork of the consumer's own,
|
|
1445
|
+
* artwork of the consumer's own, centerd and sized from the column through
|
|
1446
1446
|
* `--slotted-icon-size`. No stylesheet fills it.
|
|
1447
1447
|
*/
|
|
1448
1448
|
[data-ui-select] [data-part-icon] {
|
|
@@ -1550,7 +1550,7 @@
|
|
|
1550
1550
|
* takes the direction from the sentence's own first strong character, so an
|
|
1551
1551
|
* English count reads as itself and a translated one reads as itself — the
|
|
1552
1552
|
* same repair `text-field` makes for an adornment, and for the same reason.
|
|
1553
|
-
* These two parts are
|
|
1553
|
+
* These two parts are centerd, so taking their own direction costs no
|
|
1554
1554
|
* alignment; an option's label is the consumer's content and keeps the
|
|
1555
1555
|
* document's direction unless the consumer says otherwise.
|
|
1556
1556
|
*/
|
|
@@ -1633,11 +1633,11 @@
|
|
|
1633
1633
|
cursor: progress;
|
|
1634
1634
|
}
|
|
1635
1635
|
|
|
1636
|
-
/* ── Forced
|
|
1636
|
+
/* ── Forced colors ───────────────────────────────────────────────────── */
|
|
1637
1637
|
|
|
1638
1638
|
/**
|
|
1639
1639
|
* The one thing the theme cannot reach. Every tone surface becomes `Canvas`
|
|
1640
|
-
* under forced
|
|
1640
|
+
* under forced colors, so the highlight — which is this family's answer to
|
|
1641
1641
|
* "which option am I on", not decoration — would disappear and leave a reader
|
|
1642
1642
|
* with no way to tell.
|
|
1643
1643
|
*/
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
*/
|
|
32
32
|
[data-ui-side-navigation] {
|
|
33
33
|
--_row-height: var(--slotted-app-shell-row-height, var(--slotted-control-height-md, 34px));
|
|
34
|
-
/** The mark's box is the row's height: a square the mark is
|
|
34
|
+
/** The mark's box is the row's height: a square the mark is centerd in. */
|
|
35
35
|
--_mark: var(--slotted-app-shell-row-mark, var(--_row-height));
|
|
36
36
|
--_inset: var(--slotted-app-shell-row-inset, var(--slotted-space-4, 0.5rem));
|
|
37
37
|
/**
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
* The second line of the current row is the page's own ink, not the
|
|
122
122
|
* tone's: the muted ink measures 4.47:1 over the accent surface in
|
|
123
123
|
* `light`, under the floor, and the tone's text would make the two lines
|
|
124
|
-
* one
|
|
124
|
+
* one color. The default ink keeps the line secondary by size and weight.
|
|
125
125
|
*/
|
|
126
126
|
--_current-description-color: var(
|
|
127
127
|
--slotted-side-navigation-current-description-color,
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
gap: var(--_section-gap);
|
|
179
179
|
/**
|
|
180
180
|
* `container-type: inline-size` makes the box's intrinsic width nought,
|
|
181
|
-
* so the width is stated: the shell's rail
|
|
181
|
+
* so the width is stated: the shell's rail centers the children of its
|
|
182
182
|
* body, and a root left to `auto` there measured nothing and drew nothing.
|
|
183
183
|
*/
|
|
184
184
|
inline-size: 100%;
|
|
@@ -310,7 +310,7 @@
|
|
|
310
310
|
|
|
311
311
|
/**
|
|
312
312
|
* The nested list is inset so its labels stand under the parent's, and a
|
|
313
|
-
* guide runs down the mark's
|
|
313
|
+
* guide runs down the mark's center: shadcn and Primer both draw it, and it
|
|
314
314
|
* is what tells a third level from a second.
|
|
315
315
|
*/
|
|
316
316
|
[data-ui-side-navigation] [data-part-item] > [data-part-group] {
|
|
@@ -335,7 +335,7 @@
|
|
|
335
335
|
position: absolute;
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
-
/* … and down the
|
|
338
|
+
/* … and down the center of the mark for one that has it. */
|
|
339
339
|
[data-ui-side-navigation][data-guides]
|
|
340
340
|
[data-part-item]:has(> :is([data-part-link], [data-part-trigger]) > [data-part-icon])
|
|
341
341
|
> [data-part-group]::before {
|
|
@@ -435,7 +435,7 @@
|
|
|
435
435
|
/**
|
|
436
436
|
* The mark's box starts where the row's inset ends, in a labelled column
|
|
437
437
|
* and in the rail alike: the rail is the box plus an inset a side, so a
|
|
438
|
-
* row with no padding and its mark
|
|
438
|
+
* row with no padding and its mark centerd puts the mark where a padded
|
|
439
439
|
* row put it. Nothing moves when the region changes width.
|
|
440
440
|
*/
|
|
441
441
|
margin-inline-end: var(--_gap);
|
|
@@ -515,7 +515,7 @@
|
|
|
515
515
|
* its height to the empty second one, which put every one-line label in the
|
|
516
516
|
* top half of its row. A two-line row is the exception: there the second
|
|
517
517
|
* track has words in it, so the mark, the suffix and the chevron span the
|
|
518
|
-
* pair and
|
|
518
|
+
* pair and center on it, and the two lines sit on their own line boxes with
|
|
519
519
|
* nothing between — the first version put the title on the mark's own
|
|
520
520
|
* thirty-four pixels and the description under that, which read as a gap.
|
|
521
521
|
*/
|
|
@@ -632,20 +632,20 @@
|
|
|
632
632
|
rotate: -90deg;
|
|
633
633
|
}
|
|
634
634
|
|
|
635
|
-
/* ── The ink,
|
|
635
|
+
/* ── The ink, centerd rather than the line box ────────────────────────── */
|
|
636
636
|
|
|
637
637
|
/**
|
|
638
|
-
* A grid track
|
|
638
|
+
* A grid track centers the *line box*, and a line box is not symmetric
|
|
639
639
|
* around the letters in it: the ascender reaches further above the cap than
|
|
640
|
-
* the descender reaches below the baseline, so a label
|
|
640
|
+
* the descender reaches below the baseline, so a label centerd beside a
|
|
641
641
|
* mark sits high — the reviewer read the words as "more up than down".
|
|
642
642
|
* `text-box` trims each line to the cap and the baseline, and the padding
|
|
643
643
|
* gives the half-leading back on both sides equally, so the box the track
|
|
644
|
-
*
|
|
644
|
+
* centers is symmetric around the ink and the row keeps the height it had.
|
|
645
645
|
* It is the treatment `button`, `badge`, `kbd` and `tag` already take.
|
|
646
646
|
*
|
|
647
|
-
* The count is trimmed too, so a figure's cap
|
|
648
|
-
*
|
|
647
|
+
* The count is trimmed too, so a figure's cap center and the label's cap
|
|
648
|
+
* center are the same line; the section title and the description follow
|
|
649
649
|
* for the same reason. `0.75em` stands for the cap height, as it does in
|
|
650
650
|
* `button`: a proportion of the type, which is what the trim removes.
|
|
651
651
|
*/
|
|
@@ -1069,7 +1069,7 @@
|
|
|
1069
1069
|
padding-inline-start: var(--_indent);
|
|
1070
1070
|
}
|
|
1071
1071
|
|
|
1072
|
-
/* ── Forced
|
|
1072
|
+
/* ── Forced colors ───────────────────────────────────────────────────── */
|
|
1073
1073
|
|
|
1074
1074
|
@media (forced-colors: active) {
|
|
1075
1075
|
[data-ui-side-navigation] [data-part-link][data-current],
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* one thing a placeholder means: a surface that is not available yet. It
|
|
10
10
|
* carries a cost, and the rim is what pays it — in the `high-contrast`
|
|
11
11
|
* scheme that token is the page's own white, so a fill alone would be an
|
|
12
|
-
* invisible box. `--slotted-border-subtle` is the fill's own
|
|
12
|
+
* invisible box. `--slotted-border-subtle` is the fill's own color in
|
|
13
13
|
* light, a faint step in dark, and black in high contrast: a rim that
|
|
14
14
|
* appears exactly where the fill stops working and adds no noise where it
|
|
15
15
|
* does.
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
[data-ui-skeleton][data-part-root][data-loading],
|
|
27
27
|
[data-ui-skeleton][data-part-text][data-loading] [data-part-line] {
|
|
28
28
|
/**
|
|
29
|
-
* The unavailable surface, pushed a little toward the text
|
|
29
|
+
* The unavailable surface, pushed a little toward the text color. The
|
|
30
30
|
* token alone is not enough and the first dark capture is why: in the dark
|
|
31
31
|
* scheme `--slotted-disabled-background` is `#18181b` over a `#131316`
|
|
32
32
|
* ground, one step apart, and a page of placeholders read as an empty
|
|
33
33
|
* page. Mixing toward `--slotted-text` moves away from the ground in every
|
|
34
|
-
* scheme, because the text
|
|
34
|
+
* scheme, because the text color is the far end of each scheme's own
|
|
35
35
|
* range — darker in light, lighter in dark, black in high contrast.
|
|
36
36
|
*
|
|
37
37
|
* Eight per cent, measured rather than chosen. In oklab lightness the
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
);
|
|
52
52
|
--_edge: var(--slotted-skeleton-border-color, var(--slotted-border-subtle, ButtonBorder));
|
|
53
53
|
/**
|
|
54
|
-
* A shimmer needs a second
|
|
54
|
+
* A shimmer needs a second color, and in August this family declined to
|
|
55
55
|
* have one on the grounds that the theme did not own it. It does: the band
|
|
56
56
|
* is the fill carried further along the same axis the fill was derived on,
|
|
57
57
|
* so it separates from the fill in every scheme without a token of its own.
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
* because the two are the same white in light and a full step apart in
|
|
72
72
|
* dark, which is where the pulse was too quiet to see.
|
|
73
73
|
*
|
|
74
|
-
* A
|
|
74
|
+
* A color rather than an opacity, and that is a correction rather than a
|
|
75
75
|
* preference. The pulse used to fade the whole box, which flickered in the
|
|
76
76
|
* dark scheme: the rim faded with the fill, so once every cycle the shape
|
|
77
77
|
* came within a hair of the ground and then came back. Painting the
|
|
@@ -109,9 +109,9 @@
|
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
111
|
* A bar the height of the type it is placed in, sitting on that type's
|
|
112
|
-
* optical
|
|
112
|
+
* optical center rather than on its baseline — the correction `link` derives
|
|
113
113
|
* for the marker it draws beside a word, for the same reason: an inline box
|
|
114
|
-
* is aligned by its bottom edge, and
|
|
114
|
+
* is aligned by its bottom edge, and centering it on the cap line is what
|
|
115
115
|
* puts it where the reader expects the word to be.
|
|
116
116
|
*
|
|
117
117
|
* There is no size axis here on purpose. `1em` is the size of whatever type
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
* Zero for the default bar, and that is the point rather than an accident:
|
|
130
130
|
* a box one cap tall, aligned on the baseline, occupies exactly the band a
|
|
131
131
|
* capital letter occupies. The expression stays because a consumer who
|
|
132
|
-
* overrides the height still wants it
|
|
132
|
+
* overrides the height still wants it centerd on the same band.
|
|
133
133
|
*/
|
|
134
134
|
vertical-align: calc(0.5cap - 0.5 * var(--_line));
|
|
135
135
|
}
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
[data-ui-skeleton][data-part-root][data-loading]:not(:empty) {
|
|
219
219
|
block-size: var(--slotted-skeleton-block-size, auto);
|
|
220
220
|
/* An element child is hidden by `visibility`; a bare text node is not an
|
|
221
|
-
element and can only be hidden by taking the
|
|
221
|
+
element and can only be hidden by taking the color away. */
|
|
222
222
|
color: transparent;
|
|
223
223
|
inline-size: var(--slotted-skeleton-inline-size, auto);
|
|
224
224
|
}
|
|
@@ -419,7 +419,7 @@
|
|
|
419
419
|
* The theme remaps the fill to `Canvas` and the rim to `ButtonBorder`, so
|
|
420
420
|
* the box survives on its own. What does not survive is the gradient: a
|
|
421
421
|
* `background-image` is not replaced by the system palette, so a shimmer
|
|
422
|
-
* would go on painting a mixed
|
|
422
|
+
* would go on painting a mixed color over a forced one.
|
|
423
423
|
*/
|
|
424
424
|
@media (forced-colors: active) {
|
|
425
425
|
[data-ui-skeleton][data-part-root][data-loading]::after,
|
package/src/slider/slider.css
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
* under one. Marks are ruler ticks outside the rail rather than dots on
|
|
60
60
|
* it, because a dot on the rail has to be legible against the fill and
|
|
61
61
|
* against the empty channel at once, and in the `high-contrast` scheme —
|
|
62
|
-
* where the palette is two
|
|
62
|
+
* where the palette is two colors — it cannot be both.
|
|
63
63
|
*/
|
|
64
64
|
--_mark-gap: calc(
|
|
65
65
|
(var(--_thumb-size) - var(--_track-size)) / 2 + var(--slotted-space-1, 0.125rem)
|
|
@@ -255,7 +255,7 @@
|
|
|
255
255
|
* capture showed a black rail with a nearly black fill on it.
|
|
256
256
|
*
|
|
257
257
|
* It is inset by half a thumb at each end of the control, so the scale's two
|
|
258
|
-
* bounds are the two places a thumb's
|
|
258
|
+
* bounds are the two places a thumb's center can reach and the thumb itself
|
|
259
259
|
* stays inside the band.
|
|
260
260
|
*/
|
|
261
261
|
[data-ui-slider] [data-part-track] {
|
|
@@ -280,7 +280,7 @@
|
|
|
280
280
|
/**
|
|
281
281
|
* The filled portion, between the origin and the value. `--_start` and
|
|
282
282
|
* `--_end` are two percentages rather than a length and an offset, so a
|
|
283
|
-
* range fills between its thumbs and a slider with a
|
|
283
|
+
* range fills between its thumbs and a slider with a centerd origin fills
|
|
284
284
|
* outward from the middle with the same two declarations.
|
|
285
285
|
*
|
|
286
286
|
* On the cross axis it is laid against the track's *border* box and not its
|
|
@@ -371,9 +371,9 @@
|
|
|
371
371
|
}
|
|
372
372
|
|
|
373
373
|
/**
|
|
374
|
-
* The label at either end of the scale is aligned inside rather than
|
|
375
|
-
* on its tick.
|
|
376
|
-
* of the `marks` scene showed "
|
|
374
|
+
* The label at either end of the scale is aligned inside rather than centerd
|
|
375
|
+
* on its tick. Centerd, half of it hangs off the control: the first capture
|
|
376
|
+
* of the `marks` scene showed "Maximum" clipped by the edge of the cell, and
|
|
377
377
|
* a scale whose last label cannot be read is a scale with four labels.
|
|
378
378
|
*/
|
|
379
379
|
[data-ui-slider][data-orientation='horizontal']
|
|
@@ -388,7 +388,7 @@
|
|
|
388
388
|
* An edge label takes its own measure and grows inward. The shared cap makes
|
|
389
389
|
* a word longer than the cap overflow toward the inline end, which for the
|
|
390
390
|
* label at the end of the scale is off the control: the 240-pixel capture
|
|
391
|
-
* printed "
|
|
391
|
+
* printed "Maximum" over the edge of its own cell.
|
|
392
392
|
*/
|
|
393
393
|
[data-ui-slider][data-orientation='horizontal']
|
|
394
394
|
[data-part-mark][data-edge]
|
|
@@ -409,7 +409,7 @@
|
|
|
409
409
|
* The one place this family names a side, and only in the mirrored document.
|
|
410
410
|
* `translate` is a physical transform: a percentage along the inline axis
|
|
411
411
|
* moves the box left in both directions, so a right-to-left page would hang
|
|
412
|
-
* every
|
|
412
|
+
* every centerd label half a box off its own tick.
|
|
413
413
|
*/
|
|
414
414
|
[data-ui-slider][data-orientation='horizontal']:dir(rtl)
|
|
415
415
|
[data-part-mark]:not([data-edge])
|
|
@@ -426,7 +426,7 @@
|
|
|
426
426
|
|
|
427
427
|
/* ── The thumb ────────────────────────────────────────────────────────
|
|
428
428
|
*
|
|
429
|
-
*
|
|
429
|
+
* Centerd on its position by a logical margin rather than by `translate`, so
|
|
430
430
|
* the mirrored document needs no rule of its own: `margin-inline-start`
|
|
431
431
|
* measures from whichever edge `inset-inline-start` measured from.
|
|
432
432
|
*/
|
|
@@ -587,7 +587,7 @@
|
|
|
587
587
|
}
|
|
588
588
|
|
|
589
589
|
/**
|
|
590
|
-
* The thumb grows under the press rather than only changing
|
|
590
|
+
* The thumb grows under the press rather than only changing color. It is
|
|
591
591
|
* the one movement in the family that carries information — the control has
|
|
592
592
|
* taken the gesture — and it collapses with the duration token under reduced
|
|
593
593
|
* motion.
|
|
@@ -615,7 +615,7 @@
|
|
|
615
615
|
* Invalid outranks hover and is written after it for that reason. The ring is
|
|
616
616
|
* retargeted rather than repainted: every rule that draws focus reads
|
|
617
617
|
* `--slotted-focus-ring-color`, so pointing that one name at the invalid
|
|
618
|
-
*
|
|
618
|
+
* color moves the outline and the shadow together.
|
|
619
619
|
*/
|
|
620
620
|
[data-ui-slider][data-part-root][data-invalid] {
|
|
621
621
|
--slotted-focus-ring-color: var(
|
|
@@ -647,7 +647,7 @@
|
|
|
647
647
|
var(--slotted-tone-danger-border)
|
|
648
648
|
);
|
|
649
649
|
/*
|
|
650
|
-
* Width as well as
|
|
650
|
+
* Width as well as color (WCAG 1.4.1), the edge `text-field` draws: in
|
|
651
651
|
* `high-contrast` the danger fill and border are the accent's black. The
|
|
652
652
|
* thumb carries it, as a shadow inside its border, so the thumb keeps its
|
|
653
653
|
* size and its place on the track; it takes the resting lift's place.
|
|
@@ -740,10 +740,10 @@
|
|
|
740
740
|
}
|
|
741
741
|
|
|
742
742
|
/**
|
|
743
|
-
* The one block the theme cannot write for the family. Under forced
|
|
743
|
+
* The one block the theme cannot write for the family. Under forced colors
|
|
744
744
|
* a background is repainted by the operating system, and the channel, the
|
|
745
745
|
* fill and the thumb are three backgrounds that have to stay three different
|
|
746
|
-
* things — a fill flattened to the channel's
|
|
746
|
+
* things — a fill flattened to the channel's color would leave a slider
|
|
747
747
|
* with no value on it at all.
|
|
748
748
|
*/
|
|
749
749
|
@media (forced-colors: active) {
|
|
@@ -771,7 +771,7 @@
|
|
|
771
771
|
border-color: GrayText;
|
|
772
772
|
}
|
|
773
773
|
|
|
774
|
-
/* The invalid edge is a shadow, which forced
|
|
774
|
+
/* The invalid edge is a shadow, which forced colors remove: it comes back
|
|
775
775
|
as an outline inside the thumb's border, and a focused invalid thumb
|
|
776
776
|
draws its ring double. */
|
|
777
777
|
[data-ui-slider][data-invalid] [data-part-thumb] {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* The first SVG the library draws. The geometry — where a point is, how
|
|
4
4
|
* wide a bar is — is computed in `@slotted/core/sparkline` from the box the
|
|
5
5
|
* binding measured, so this sheet decides only what the marks are made of:
|
|
6
|
-
* the
|
|
6
|
+
* the color, the stroke, the marker, the wash under a line and the height
|
|
7
7
|
* of the box.
|
|
8
8
|
*
|
|
9
9
|
* The root is inline-block and takes the whole inline size of what holds
|
|
@@ -18,23 +18,23 @@
|
|
|
18
18
|
--_size: var(--slotted-sparkline-block-size, var(--slotted-space-9, 2rem));
|
|
19
19
|
--_stroke: var(--slotted-sparkline-line-width, var(--slotted-border-width-thick, 2px));
|
|
20
20
|
/* A marker six pixels across — four at sm, eight at lg — with a ring in
|
|
21
|
-
the
|
|
21
|
+
the color of the ground, so it stays legible where it crosses the
|
|
22
22
|
line. Smaller than the eight pixels a chart's hover target needs: a
|
|
23
23
|
sparkline has no hover, and a disc a third the height of a 20-pixel
|
|
24
24
|
box was the first thing the reviewer saw. */
|
|
25
25
|
--_marker: var(--slotted-sparkline-marker-size, var(--slotted-space-3, 0.375rem));
|
|
26
26
|
--_ring: var(--slotted-sparkline-ring-width, var(--slotted-border-width-thick, 2px));
|
|
27
27
|
--_ring-color: var(--slotted-sparkline-ring-color, var(--slotted-surface-raised, Canvas));
|
|
28
|
-
/* The wash under a line: the series
|
|
28
|
+
/* The wash under a line: the series color fading from this share at the
|
|
29
29
|
line to nothing at the bottom edge. A number rather than a token step,
|
|
30
30
|
recorded in the token file: no scale in the foundation holds an
|
|
31
31
|
opacity for a fill that is read through, and the two that hold one for
|
|
32
32
|
a band (`highlight`, `selection`) are calibrated for text sitting on
|
|
33
33
|
them, which nothing does here. */
|
|
34
34
|
--_area-opacity: var(--slotted-sparkline-area-opacity, 0.18);
|
|
35
|
-
/* Every bar but the current one is drawn in the
|
|
35
|
+
/* Every bar but the current one is drawn in the color mixed at this
|
|
36
36
|
share with the line between two surfaces, so the last period reads as
|
|
37
|
-
the one the value is about. Mixed with a
|
|
37
|
+
the one the value is about. Mixed with a color rather than faded
|
|
38
38
|
with opacity: a bar at half opacity is a tint the page cannot
|
|
39
39
|
promise a ratio for — pale blue on white in `high-contrast` — where
|
|
40
40
|
`--slotted-border-strong` holds 3:1 against every surface in every
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
);
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
|
-
* The
|
|
54
|
+
* The color, resolved in one order. A tone says how the series is doing
|
|
55
55
|
* and wins; a series slot says which one it is; a sparkline that names
|
|
56
|
-
* neither reads the
|
|
56
|
+
* neither reads the color its container states — a card's trend region
|
|
57
57
|
* writes `--slotted-sparkline-color` from its own tone — or the first slot
|
|
58
58
|
* of the data scale, which takes the accent seed's hue.
|
|
59
59
|
*/
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
/**
|
|
171
|
-
* The wash: the series
|
|
171
|
+
* The wash: the series color, faded to nothing at the bottom by a mask
|
|
172
172
|
* rather than by a gradient element, so the `svg` needs no `id` and a page
|
|
173
173
|
* of forty sparklines does not mint forty gradients. `mask-image` applies to
|
|
174
174
|
* an SVG child from CSS in every engine that ships `@layer`.
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
|
|
209
209
|
/**
|
|
210
210
|
* A reference is a hairline and it is dashed: it is the one line in the box
|
|
211
|
-
* that is not data, and the dash is what says so before the
|
|
211
|
+
* that is not data, and the dash is what says so before the color does.
|
|
212
212
|
* The dash lengths are geometry of the stroke, not a scale step.
|
|
213
213
|
*/
|
|
214
214
|
[data-ui-sparkline] [data-part-reference] {
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
* for the one frame before the box is measured, so a circle there is an
|
|
228
228
|
* ellipse; a stroke under `vector-effect: non-scaling-stroke` is measured
|
|
229
229
|
* on the screen and stays round whatever the grid does. The ring is drawn
|
|
230
|
-
* in the
|
|
230
|
+
* in the color of the ground so the disc stays legible where it lands on
|
|
231
231
|
* the line.
|
|
232
232
|
*/
|
|
233
233
|
[data-ui-sparkline] [data-part-ring],
|
|
@@ -277,11 +277,11 @@
|
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
/**
|
|
280
|
-
* Under forced
|
|
280
|
+
* Under forced colors the theme has already mapped the data scale and the
|
|
281
281
|
* tones to `CanvasText`, so a line and a marker keep their ink. What the
|
|
282
282
|
* theme cannot do is undo the mix in the bars or the wash: a bar mixed from
|
|
283
|
-
* two system
|
|
284
|
-
* tint it has no
|
|
283
|
+
* two system colors is a color the mode does not have, and the wash is a
|
|
284
|
+
* tint it has no color for. The earlier bars take `GrayText`, the current
|
|
285
285
|
* one `CanvasText`, and the wash goes.
|
|
286
286
|
*/
|
|
287
287
|
@media (forced-colors: active) {
|
package/src/spinner/spinner.css
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
/* A ring that shrinks is not a ring: it keeps its size in a flex row. */
|
|
44
44
|
flex: none;
|
|
45
45
|
/*
|
|
46
|
-
* Not adjusting keeps `currentcolor`, the host's ink, which forced
|
|
46
|
+
* Not adjusting keeps `currentcolor`, the host's ink, which forced colors
|
|
47
47
|
* have already set, on a stroke the system would otherwise repaint.
|
|
48
48
|
*/
|
|
49
49
|
forced-color-adjust: none;
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
* label wrap inside its own control, which is `button`'s rule.
|
|
58
58
|
*/
|
|
59
59
|
min-inline-size: 0;
|
|
60
|
-
/* A control written inside a sentence sits on the text's
|
|
60
|
+
/* A control written inside a sentence sits on the text's center. */
|
|
61
61
|
vertical-align: middle;
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
* A filled half that is unavailable has no darkest step to draw the seam
|
|
182
182
|
* in: `button` paints it the disabled ground inside the disabled border,
|
|
183
183
|
* and the seam takes that border so the bar reads as one unavailable
|
|
184
|
-
* control rather than as a grey one with a
|
|
184
|
+
* control rather than as a grey one with a colored line through it.
|
|
185
185
|
*/
|
|
186
186
|
[data-ui-split-button][data-part-root]
|
|
187
187
|
> [data-ui-button][data-variant='solid'][data-part-menu-trigger]:disabled,
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
* menu button keeps; not the ellipsis, which says "more" without saying
|
|
208
208
|
* what opens. It is the `chevron-down` Glyph element the binding renders in
|
|
209
209
|
* the icon part, stroked in the control's own ink, so it follows the label
|
|
210
|
-
* into hover, press, disabled, every tone's `on-solid` and forced
|
|
210
|
+
* into hover, press, disabled, every tone's `on-solid` and forced colors.
|
|
211
211
|
* `button` sizes it through the icon part; this stylesheet paints nothing.
|
|
212
212
|
*
|
|
213
213
|
* It does not turn while the menu is open. None of the six surveyed split
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
/**
|
|
242
|
-
* Under forced
|
|
242
|
+
* Under forced colors the theme flattens every fill, so a half that is
|
|
243
243
|
* pressed has only its edge left to say so. `button` makes that edge
|
|
244
244
|
* `Highlight`; the frame rule above would have taken it away, and this
|
|
245
245
|
* puts it back — `button-group`'s rule for the same case.
|