@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
|
@@ -10,17 +10,17 @@
|
|
|
10
10
|
* control icon wide plus one step of air on each side, and a marker holding
|
|
11
11
|
* an avatar is the smallest avatar. The rail is a
|
|
12
12
|
* column as wide as the widest marker the timeline holds. The connector is a
|
|
13
|
-
* hairline that runs from the
|
|
13
|
+
* hairline that runs from the center of one marker to the center of the
|
|
14
14
|
* next. Everything else — how far the words stand off the rail, the rhythm
|
|
15
15
|
* between events — is the control gap plus a step, so density moves the
|
|
16
16
|
* whole timeline together.
|
|
17
17
|
*
|
|
18
|
-
* Every width a
|
|
18
|
+
* Every width a center depends on — the dot, its core, the badge, the rail —
|
|
19
19
|
* is the line's own width plus an even number of pixels, rounded up to it.
|
|
20
20
|
* The line then stands a whole number of pixels inside each of them. An
|
|
21
21
|
* eight-pixel dot on a one-pixel line put the line three and a half pixels
|
|
22
22
|
* in, the browser rounded the half to a whole CSS pixel, and the line was
|
|
23
|
-
* drawn one device pixel off the dot's
|
|
23
|
+
* drawn one device pixel off the dot's center at 100%, 150% and 200%.
|
|
24
24
|
*/
|
|
25
25
|
[data-ui-timeline] {
|
|
26
26
|
--_icon: var(--slotted-control-icon-size-md, 16px);
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
/* The glyph a badge holds, and the size of a dot and of a spinner: the glyph less a step of air a side. */
|
|
42
42
|
--_glyph: calc(var(--_icon) - 2 * var(--slotted-space-1, 0.125rem));
|
|
43
43
|
--_dot: calc(var(--_rule) + round(up, var(--_glyph) - var(--_rule), 2px));
|
|
44
|
-
/* The solid
|
|
44
|
+
/* The solid center of a dot, a proportion of it: the literal the contract records. */
|
|
45
45
|
--_core: calc(
|
|
46
46
|
var(--_rule) +
|
|
47
47
|
round(nearest, var(--_dot) * var(--slotted-timeline-core-ratio, 0.4) - var(--_rule), 2px)
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
127
|
* One badge anywhere widens the rail everywhere, groups included, so the
|
|
128
|
-
* dots of the plain events stay on the same
|
|
128
|
+
* dots of the plain events stay on the same center as the badge and every
|
|
129
129
|
* title starts at the same indent. A spinner and the check of a finished
|
|
130
130
|
* dot are a dot's size and widen nothing.
|
|
131
131
|
*/
|
|
@@ -295,7 +295,7 @@
|
|
|
295
295
|
*
|
|
296
296
|
* The column the marker and the line share, the full height of the row.
|
|
297
297
|
* Its type is the title's, so `1lh` here is the title's first line, and the
|
|
298
|
-
* middle of that line is where every marker
|
|
298
|
+
* middle of that line is where every marker centers and where every
|
|
299
299
|
* connector starts and ends — whatever size the marker is.
|
|
300
300
|
*/
|
|
301
301
|
|
|
@@ -313,15 +313,15 @@
|
|
|
313
313
|
* A dot when the marker is empty or holds a spinner, a badge when it holds
|
|
314
314
|
* a glyph or an avatar. The marker is pushed from the top of the row by half
|
|
315
315
|
* the difference between one line and itself, the rule `toast` and `alert`
|
|
316
|
-
* draw their marks with, so a dot and a badge in the same list
|
|
316
|
+
* draw their marks with, so a dot and a badge in the same list center on the
|
|
317
317
|
* same line. It stands above the connector and wears a halo of the ground,
|
|
318
318
|
* which is the air the line leaves around it; a halo rather than a shortened
|
|
319
|
-
* line, because the line then runs
|
|
319
|
+
* line, because the line then runs center to center and never has to know
|
|
320
320
|
* how big the next marker is.
|
|
321
321
|
*
|
|
322
322
|
* A dot is drawn in three layers of one box: the box's ground, its border,
|
|
323
323
|
* and a core laid over it at a whole-pixel inset. There is no smaller box
|
|
324
|
-
*
|
|
324
|
+
* centerd by arithmetic, so the core lands where the ring does.
|
|
325
325
|
*/
|
|
326
326
|
[data-ui-timeline] [data-part-marker] {
|
|
327
327
|
--_marker: var(--_dot);
|
|
@@ -377,7 +377,7 @@
|
|
|
377
377
|
* off each edge. The badge is odd so the line runs through its middle; a
|
|
378
378
|
* glyph of 12 stood four and a half pixels in, the browser painted it on
|
|
379
379
|
* the next whole pixel, and its ink sat half a CSS pixel right of and below
|
|
380
|
-
* the disc's
|
|
380
|
+
* the disc's center at every zoom — two device pixels at 400%, measured on
|
|
381
381
|
* the painted capture. The avatar fills its own marker without a ring.
|
|
382
382
|
*
|
|
383
383
|
* The check of a finished dot is the one icon the family puts in a marker
|
|
@@ -424,7 +424,7 @@
|
|
|
424
424
|
* Four emphases, read on the item, each drawn twice: once as a dot, once as
|
|
425
425
|
* a badge. `subtle` is the default and the quiet one — a solid core in a
|
|
426
426
|
* soft disc of its own tone, or a badge on the tone's ground with its edge,
|
|
427
|
-
* the pair rule `docs/token-foundation.md` states under semantic
|
|
427
|
+
* the pair rule `docs/token-foundation.md` states under semantic color.
|
|
428
428
|
* `outline` is the hollow ring, `solid` fills, and `plain` drops every frame:
|
|
429
429
|
* the core alone, threaded on the line, or the bare glyph over it.
|
|
430
430
|
*/
|
|
@@ -442,7 +442,7 @@
|
|
|
442
442
|
|
|
443
443
|
[data-ui-timeline] [data-variant='solid'] [data-part-marker]:is(:empty, :has(> [data-check])) {
|
|
444
444
|
background-color: var(--_tone-mark);
|
|
445
|
-
/* A border as wide as the radius, so forced
|
|
445
|
+
/* A border as wide as the radius, so forced colors, which drop the ground, keep the disc. */
|
|
446
446
|
border-color: var(--_tone-mark);
|
|
447
447
|
border-width: calc(var(--_marker) / 2);
|
|
448
448
|
}
|
|
@@ -488,21 +488,21 @@
|
|
|
488
488
|
|
|
489
489
|
/* ── Statuses ───────────────────────────────────────────────────────────
|
|
490
490
|
*
|
|
491
|
-
* Each one is a shape as well as a
|
|
492
|
-
* every tone in one ink and forced
|
|
491
|
+
* Each one is a shape as well as a color, because `high-contrast` paints
|
|
492
|
+
* every tone in one ink and forced colors paint every ring in one. Pending
|
|
493
493
|
* is the variant's own mark; complete is a filled disc with the check
|
|
494
494
|
* knocked out of it; current is a filled disc with a ring around it, a
|
|
495
495
|
* target; loading is the shared spinner. The ring is a shadow and not an
|
|
496
496
|
* outline, because an outline in this library is the focus ring and a ring
|
|
497
|
-
* in the tone's ink around a marker would read as focus; forced
|
|
497
|
+
* in the tone's ink around a marker would read as focus; forced colors drop
|
|
498
498
|
* the shadow, and the block at the end draws it there as an outline in the
|
|
499
|
-
* system's ink, where no
|
|
499
|
+
* system's ink, where no color can be mistaken.
|
|
500
500
|
*/
|
|
501
501
|
|
|
502
502
|
/**
|
|
503
503
|
* A finished dot fills with its ground, not with a border as wide as its
|
|
504
504
|
* radius: that border would leave the check no box to stand in. Forced
|
|
505
|
-
*
|
|
505
|
+
* colors keep the ground through the block at the end.
|
|
506
506
|
*/
|
|
507
507
|
[data-ui-timeline] [data-complete]:not([data-current]) [data-part-marker]:has(> [data-check]) {
|
|
508
508
|
background-color: var(--_tone-mark);
|
|
@@ -520,7 +520,7 @@
|
|
|
520
520
|
}
|
|
521
521
|
|
|
522
522
|
/**
|
|
523
|
-
* The check is knocked out of the disc in the ground's own
|
|
523
|
+
* The check is knocked out of the disc in the ground's own color, so it
|
|
524
524
|
* reads in every tone and scheme without a token of its own; it is the
|
|
525
525
|
* dot less a step a side, the same air a badge gives its glyph.
|
|
526
526
|
*/
|
|
@@ -567,10 +567,10 @@
|
|
|
567
567
|
/* ── The connector ──────────────────────────────────────────────────────
|
|
568
568
|
*
|
|
569
569
|
* A hairline from the middle of this row's first line to the middle of the
|
|
570
|
-
* next row's, which are the two markers'
|
|
570
|
+
* next row's, which are the two markers' centers; the markers stand above
|
|
571
571
|
* it and their halo opens the gap. It is a border rather than a painted
|
|
572
572
|
* background, so `dashed` is a word rather than a gradient and the line
|
|
573
|
-
* keeps its
|
|
573
|
+
* keeps its color under forced colors. The last item of a list draws
|
|
574
574
|
* none, because there is nothing after it.
|
|
575
575
|
*/
|
|
576
576
|
|
|
@@ -943,11 +943,11 @@
|
|
|
943
943
|
}
|
|
944
944
|
|
|
945
945
|
/**
|
|
946
|
-
* The pill answers with a state layer: its own text
|
|
946
|
+
* The pill answers with a state layer: its own text color, at a low
|
|
947
947
|
* strength, mixed into the tinted ground, the step `tag` and `avatar` take
|
|
948
948
|
* for the same reason. The tinted ramp ends at the surface the pill rests
|
|
949
949
|
* on — `subtle-hover` lightened it toward the page in the light scheme, and
|
|
950
|
-
* matched the page in the dark one, and `subtle-active` was the rest
|
|
950
|
+
* matched the page in the dark one, and `subtle-active` was the rest color.
|
|
951
951
|
*/
|
|
952
952
|
[data-ui-timeline] [data-part-fresh]:enabled:hover {
|
|
953
953
|
background-color: color-mix(
|
|
@@ -1162,7 +1162,7 @@
|
|
|
1162
1162
|
/* ── Horizontal ─────────────────────────────────────────────────────────
|
|
1163
1163
|
*
|
|
1164
1164
|
* The same grid turned on its side: the rail above the body, the line
|
|
1165
|
-
* running along the marker's
|
|
1165
|
+
* running along the marker's center to the next item, and the list rolling
|
|
1166
1166
|
* in the inline axis when there are more events than width. Every item is
|
|
1167
1167
|
* the same width, so the markers stay a track apart however long the
|
|
1168
1168
|
* titles are.
|
|
@@ -1211,7 +1211,7 @@
|
|
|
1211
1211
|
|
|
1212
1212
|
/**
|
|
1213
1213
|
* A square as tall and as wide as the rail at the start of the item, with
|
|
1214
|
-
* the marker
|
|
1214
|
+
* the marker centerd in it, so every center sits half a rail in and the
|
|
1215
1215
|
* line runs from one to the next along the same row.
|
|
1216
1216
|
*/
|
|
1217
1217
|
[data-ui-timeline][data-orientation='horizontal'] [data-part-rail] {
|
|
@@ -1230,7 +1230,7 @@
|
|
|
1230
1230
|
}
|
|
1231
1231
|
|
|
1232
1232
|
[data-ui-timeline][data-orientation='horizontal'] [data-part-connector] {
|
|
1233
|
-
/* Widths only: the
|
|
1233
|
+
/* Widths only: the color and the dash are the rules above, for both edges. */
|
|
1234
1234
|
border-block-start-width: var(--_rule);
|
|
1235
1235
|
border-inline-start-width: 0;
|
|
1236
1236
|
block-size: 0;
|
|
@@ -1545,7 +1545,7 @@
|
|
|
1545
1545
|
}
|
|
1546
1546
|
}
|
|
1547
1547
|
|
|
1548
|
-
/* ── Forced
|
|
1548
|
+
/* ── Forced colors ─────────────────────────────────────────────────────
|
|
1549
1549
|
*
|
|
1550
1550
|
* The system replaces every painted surface with the page's own background
|
|
1551
1551
|
* and every border with one ink, and drops every shadow. The shapes survive
|
package/src/toast/toast.css
CHANGED
|
@@ -121,8 +121,8 @@
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
|
-
*
|
|
125
|
-
* divide what is left. It is the one
|
|
124
|
+
* Centerd by giving the box both insets and letting the automatic margins
|
|
125
|
+
* divide what is left. It is the one centering that needs no transform, so
|
|
126
126
|
* the transform stays free for the enter, the exit and the swipe.
|
|
127
127
|
*/
|
|
128
128
|
[data-ui-toast][data-part-root][data-placement='top'],
|
|
@@ -194,12 +194,12 @@
|
|
|
194
194
|
* `alert` measured: on a tinted ground `subtle-hover` is lighter than the
|
|
195
195
|
* ground it sits on, and on a solid one the ramp is calibrated against the
|
|
196
196
|
* page instead. `currentcolor` is legible on whatever ground the control
|
|
197
|
-
* already has, because it is the
|
|
197
|
+
* already has, because it is the color its own words are read in.
|
|
198
198
|
*
|
|
199
199
|
* Ten and sixteen per cent, the pair `alert` settled: white at eight per
|
|
200
200
|
* cent over the `danger` fill moved OKLab lightness by 0.019 in the light
|
|
201
201
|
* and dark schemes, under the 0.02 a surface step has to reach
|
|
202
|
-
|
|
202
|
+
*.
|
|
203
203
|
*/
|
|
204
204
|
--_state-hover: color-mix(
|
|
205
205
|
in oklab,
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
--_inner-size: var(--slotted-control-inner-size-md, 24px);
|
|
222
222
|
/**
|
|
223
223
|
* The status mark is `alert`'s: a filled disc a step above the title's
|
|
224
|
-
* `1em`, rounded to an even number of pixels so its
|
|
224
|
+
* `1em`, rounded to an even number of pixels so its center falls on a
|
|
225
225
|
* whole pixel — 16 at 13-pixel type, 14 at 12. A message about a failure
|
|
226
226
|
* draws the same silhouette as the alert about it. A filled mark carries
|
|
227
227
|
* more weight per pixel than an outline, so it stays within a few pixels
|
|
@@ -269,7 +269,7 @@
|
|
|
269
269
|
* The line box is rounded to an even number of pixels, the rule `alert`
|
|
270
270
|
* draws its lines with. At 13-pixel type the scale's 1.5 gave 19.5, so a
|
|
271
271
|
* message of one line was 45.5 pixels tall and one with a description
|
|
272
|
-
* 88.5 in the `content` scene; an even line also
|
|
272
|
+
* 88.5 in the `content` scene; an even line also centers the 24-pixel
|
|
273
273
|
* close control on a whole pixel: 20 at 13, 18 at 12.
|
|
274
274
|
*/
|
|
275
275
|
line-height: round(nearest, calc(var(--_line-height) * 1em), 2px);
|
|
@@ -314,14 +314,14 @@
|
|
|
314
314
|
translate var(--slotted-duration-medium) var(--slotted-easing-enter);
|
|
315
315
|
}
|
|
316
316
|
|
|
317
|
-
/* ── Tone: the
|
|
317
|
+
/* ── Tone: the color, and the mark that says the same thing ───────────
|
|
318
318
|
*
|
|
319
319
|
* The map is `specs/components/toast/contract.json`, and it is the map
|
|
320
320
|
* `alert` and `status-indicator` already share — so a message about a
|
|
321
321
|
* failure draws the same silhouette as the alert about it. The binding
|
|
322
322
|
* draws the mark as a `Glyph` from that map; this sheet gives it only the
|
|
323
|
-
* tone's
|
|
324
|
-
*
|
|
323
|
+
* tone's color. Under forced
|
|
324
|
+
* colors every ground becomes one system color and the shape is all that
|
|
325
325
|
* is left, which is WCAG 2.2 SC 1.4.1 as well as a preference.
|
|
326
326
|
*/
|
|
327
327
|
|
|
@@ -379,14 +379,14 @@
|
|
|
379
379
|
* message floats over content this family does not own, and tinting that
|
|
380
380
|
* content's corner is a decision the message has no standing to take. The
|
|
381
381
|
* tone is in the mark and in nothing else, which is enough — it is the
|
|
382
|
-
* silhouette that survives forced
|
|
382
|
+
* silhouette that survives forced colors anyway.
|
|
383
383
|
*/
|
|
384
384
|
/**
|
|
385
385
|
* A theme that paints the raised message with a surface that has alpha blurs
|
|
386
386
|
* what passes under it: `--slotted-toast-backdrop-filter`, `none` unless set.
|
|
387
387
|
* Only `raised` floats over content it does not own; `soft` and `solid` are
|
|
388
388
|
* tone grounds. A reader who asked for less transparency gets no filter, and
|
|
389
|
-
* under forced
|
|
389
|
+
* under forced colors the ground is the system's.
|
|
390
390
|
*/
|
|
391
391
|
[data-ui-toast] > [data-part-list] > [data-part-item][data-variant='raised'] {
|
|
392
392
|
-webkit-backdrop-filter: var(--slotted-toast-backdrop-filter, none);
|
|
@@ -424,29 +424,29 @@
|
|
|
424
424
|
* the binding's `Glyph` drawing a hand-drawn status mark, the silhouette
|
|
425
425
|
* filled and the tone's symbol cut out of it, so the ground shows through
|
|
426
426
|
* the symbol on every variant. Every silhouette — the circle, the warning's
|
|
427
|
-
* diamond — is symmetric on both axes, so every mark has the same
|
|
428
|
-
* and the symbol inside is what tells the five apart when
|
|
427
|
+
* diamond — is symmetric on both axes, so every mark has the same center,
|
|
428
|
+
* and the symbol inside is what tells the five apart when color is gone.
|
|
429
429
|
*
|
|
430
430
|
* The silhouette fills its box edge to edge, so the box is the mark.
|
|
431
431
|
*
|
|
432
432
|
* The mark hangs from the first line's baseline. Grid baseline alignment
|
|
433
433
|
* puts the mark's bottom edge on the words' baseline, and a relative offset
|
|
434
|
-
* lowers it by half of what the mark exceeds the capitals by, so its
|
|
435
|
-
* is the
|
|
434
|
+
* lowers it by half of what the mark exceeds the capitals by, so its center
|
|
435
|
+
* is the center of the capitals in whatever face the title is set in. The
|
|
436
436
|
* offset is rounded to a whole pixel and the mark is a whole number of
|
|
437
437
|
* pixels, so the glyphs and the drawing snap by the same amount. The
|
|
438
438
|
* negative block-start margin takes the mark's own height out of the
|
|
439
439
|
* baseline group, so the words sit where they sit with no mark at all, and
|
|
440
440
|
* layout containment keeps the glyph's own baseline out of the box's.
|
|
441
441
|
*
|
|
442
|
-
* The slot carries the
|
|
442
|
+
* The slot carries the color, and the disc is painted in `currentcolor`,
|
|
443
443
|
* so on a `solid` message the mark takes the on-solid ink with the words,
|
|
444
|
-
* and under forced
|
|
444
|
+
* and under forced colors one declaration repaints it.
|
|
445
445
|
*
|
|
446
446
|
* A mark the page supplied instead of the tone's own — a spinner from
|
|
447
447
|
* `progress-indicator` while a promise is in flight, a product's own
|
|
448
448
|
* artwork — takes the same place: an icon a consumer wrote is an icon, and
|
|
449
|
-
* the line it belongs to has not moved. The artwork is
|
|
449
|
+
* the line it belongs to has not moved. The artwork is centerd in the box,
|
|
450
450
|
* so an icon drawn at the mark's size fills it and a larger one overhangs it
|
|
451
451
|
* equally on both sides of the same axis rather than pushing the words along. A
|
|
452
452
|
* message waiting on a promise with no mark of its own draws none, and the
|
|
@@ -610,7 +610,7 @@
|
|
|
610
610
|
}
|
|
611
611
|
|
|
612
612
|
/* On a finger the target is the comfortable size in both axes and the box
|
|
613
|
-
is the one a mouse sees: a transparent box
|
|
613
|
+
is the one a mouse sees: a transparent box centerd on the control reaches
|
|
614
614
|
44 pixels, and the ground and the ring stay square. The message clips its
|
|
615
615
|
overflow, so the target ends at the message's padding edge. */
|
|
616
616
|
@media (pointer: coarse) {
|
|
@@ -659,7 +659,7 @@
|
|
|
659
659
|
/**
|
|
660
660
|
* Measured rather than assumed, and `alert` measured it first: the ring the
|
|
661
661
|
* theme calibrated against the page's surface reads about 1.3 : 1 against a
|
|
662
|
-
* tone's own fill. The ring keeps the theme's
|
|
662
|
+
* tone's own fill. The ring keeps the theme's color in every scheme (R3).
|
|
663
663
|
* The message's own ring sits outside it, against the page the theme
|
|
664
664
|
* calibrated for, and needs nothing more. The control's ring is inset in the
|
|
665
665
|
* fill, so a solid message adds a halo one ring-width wide just inside it,
|
|
@@ -694,7 +694,7 @@
|
|
|
694
694
|
animation-timing-function: linear;
|
|
695
695
|
/**
|
|
696
696
|
* The tone's saturated step rather than the ink its words are in. Read at
|
|
697
|
-
* half opacity in the ink
|
|
697
|
+
* half opacity in the ink color the bar was a grey smear under a message;
|
|
698
698
|
* two pixels of the tone's own fill is the one mark on the box that is
|
|
699
699
|
* allowed to be loud, because what it says is *this is about to go*.
|
|
700
700
|
*/
|
|
@@ -896,13 +896,13 @@
|
|
|
896
896
|
}
|
|
897
897
|
}
|
|
898
898
|
|
|
899
|
-
/* ── Forced
|
|
899
|
+
/* ── Forced colors ───────────────────────────────────────────────────
|
|
900
900
|
*
|
|
901
|
-
* The operating system replaces every author
|
|
901
|
+
* The operating system replaces every author color, so five tones become
|
|
902
902
|
* one box and three variants become one painting. What is left to decide is
|
|
903
903
|
* whether the box still has an edge and whether the mark is still there —
|
|
904
904
|
* and the theme can answer neither, because `solid` draws its border in its
|
|
905
|
-
* own fill and a transparent border is not a
|
|
905
|
+
* own fill and a transparent border is not a color the system remaps.
|
|
906
906
|
*/
|
|
907
907
|
@media (forced-colors: active) {
|
|
908
908
|
[data-ui-toast] > [data-part-list] > [data-part-item] {
|
|
@@ -915,7 +915,7 @@
|
|
|
915
915
|
|
|
916
916
|
/**
|
|
917
917
|
* The control's glyph is stroked in `currentcolor`, so giving the control
|
|
918
|
-
* a system
|
|
918
|
+
* a system color repaints it, and the mark's slot the same.
|
|
919
919
|
*/
|
|
920
920
|
[data-ui-toast] > [data-part-list] > [data-part-item] > [data-part-close] {
|
|
921
921
|
color: CanvasText;
|
|
@@ -929,7 +929,7 @@
|
|
|
929
929
|
|
|
930
930
|
/**
|
|
931
931
|
* A bar of system ink under every message, shortening, is a moving line
|
|
932
|
-
* with no
|
|
932
|
+
* with no color to say what it belongs to. The message still expires.
|
|
933
933
|
*/
|
|
934
934
|
[data-ui-toast] > [data-part-list] > [data-part-item] > [data-part-progress] {
|
|
935
935
|
background-color: CanvasText;
|
package/src/toggle/toggle.css
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* A `button` carrying `aria-pressed` in both states: the Button pattern's
|
|
6
6
|
* toggle button, whose label does not change when its state does. It is a
|
|
7
7
|
* mode — Bold, Wrap, Pin — and a mode is neutral until it is on and one
|
|
8
|
-
*
|
|
8
|
+
* color when it is: the accent ground inside the accent edge, which is the
|
|
9
9
|
* pair `docs/token-foundation.md` names for the chosen row, card, option
|
|
10
10
|
* and toggle. `button`'s ToggleButton is the other member, an action that
|
|
11
11
|
* persists — Follow, Subscribe — which reaches a server, waits, and stands
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
background: transparent;
|
|
43
43
|
block-size: var(--_height);
|
|
44
44
|
/**
|
|
45
|
-
* Always a border, and always the same width. A state changes its
|
|
45
|
+
* Always a border, and always the same width. A state changes its color
|
|
46
46
|
* and never its presence: a border that appears when the control is on
|
|
47
47
|
* moves its label by a pixel.
|
|
48
48
|
*/
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
/* No tap delay waiting for a second tap the control cannot use. */
|
|
75
75
|
touch-action: manipulation;
|
|
76
76
|
/**
|
|
77
|
-
* Nothing here moves: a toggle changes
|
|
77
|
+
* Nothing here moves: a toggle changes color, and color is what the eye
|
|
78
78
|
* has to follow. The duration is the control step, so a theme retunes
|
|
79
79
|
* every control's interaction feedback once and reduced motion collapses
|
|
80
80
|
* it to a frame.
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
var(--slotted-control-transition-easing),
|
|
87
87
|
color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
|
|
88
88
|
user-select: none;
|
|
89
|
-
/* A control written inside a sentence sits on the text's
|
|
89
|
+
/* A control written inside a sentence sits on the text's center. */
|
|
90
90
|
vertical-align: middle;
|
|
91
91
|
-webkit-tap-highlight-color: transparent;
|
|
92
92
|
}
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
115
|
* A control with no words is a square holding one mark, so its inline
|
|
116
|
-
* padding is whatever
|
|
116
|
+
* padding is whatever centers that mark rather than the padding a label
|
|
117
117
|
* needs, and its width is its height. An empty label box counts as no
|
|
118
118
|
* words: the Angular binding projects the words into a box it always
|
|
119
119
|
* renders, and a box with nothing in it must not hold the gap open either.
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
* the reason is state and not paint: ToggleButton owns `pressed` with a
|
|
15
15
|
* complete controlled and uncontrolled model, so inside a group that owns
|
|
16
16
|
* the value there would be two owners of one fact. What it costs is written
|
|
17
|
-
* here: one selected
|
|
17
|
+
* here: one selected color instead of five tones. A consumer who wants the
|
|
18
18
|
* whole palette in a joined bar writes `button-group` around ToggleButtons.
|
|
19
19
|
*
|
|
20
|
-
* "On" is one
|
|
20
|
+
* "On" is one color across the system — the accent ground inside the accent
|
|
21
21
|
* edge, which is the pair `docs/token-foundation.md` names for the chosen
|
|
22
22
|
* row, card, option and toggle, and the same pair `button` paints a pressed
|
|
23
23
|
* ToggleButton with.
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* `--slotted-control-height-*` tall to the pixel, and a bar beside a text
|
|
30
30
|
* field in a form lines up with it instead of standing two pixels prouder.
|
|
31
31
|
* The first pass framed the root as well, and the reviewer read the result
|
|
32
|
-
* correctly: a
|
|
32
|
+
* correctly: a colored border inside a grey one, and an edge that was one
|
|
33
33
|
* pixel in places and two in others.
|
|
34
34
|
*/
|
|
35
35
|
[data-ui-toggle-group][data-part-root] {
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
background: transparent;
|
|
129
129
|
block-size: var(--_height);
|
|
130
130
|
/**
|
|
131
|
-
* Always a border, and always the same width. A state changes its
|
|
131
|
+
* Always a border, and always the same width. A state changes its color
|
|
132
132
|
* and never its presence: a border that appears when an item is pressed
|
|
133
133
|
* moves every label in the bar by a pixel.
|
|
134
134
|
*/
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
position: relative;
|
|
161
161
|
/**
|
|
162
162
|
* Nothing here moves, and that is the right answer for this family: a
|
|
163
|
-
* toggle changes
|
|
163
|
+
* toggle changes color, and color is what the eye has to follow. The
|
|
164
164
|
* duration is the control step, so a theme retunes every control's
|
|
165
165
|
* interaction feedback once and reduced motion collapses it to a frame.
|
|
166
166
|
*/
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
|
|
175
175
|
/**
|
|
176
176
|
* An item with no words is a square holding one mark, so its inline padding
|
|
177
|
-
* is whatever
|
|
177
|
+
* is whatever centers that mark rather than the padding a label needs.
|
|
178
178
|
*/
|
|
179
179
|
[data-ui-toggle-group] [data-part-item]:not(:has([data-part-label])) {
|
|
180
180
|
padding-inline: 0;
|
package/src/toolbar/toolbar.css
CHANGED
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* A column stretches its controls, because a column of controls at their own
|
|
81
|
-
* natural widths is a ragged edge rather than a bar. A row
|
|
81
|
+
* natural widths is a ragged edge rather than a bar. A row centers them,
|
|
82
82
|
* because two controls of different heights in one line share a middle.
|
|
83
83
|
*/
|
|
84
84
|
[data-ui-toolbar][data-orientation='vertical'] {
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
* `docs/token-foundation.md` — and the two quantities that exception needed
|
|
206
206
|
* here are what closed it: a type step of one and a half to stop three dots
|
|
207
207
|
* reading as specks, and a lift of half an x-height to get them off their own
|
|
208
|
-
* baseline and onto the middle of the control. A glyph is
|
|
208
|
+
* baseline and onto the middle of the control. A glyph is centerd in its box
|
|
209
209
|
* by construction and sized by the same scale as every other mark on the bar.
|
|
210
210
|
*
|
|
211
211
|
* Its accessible name carries the count, so what a reader hears is a number
|
|
@@ -395,7 +395,7 @@
|
|
|
395
395
|
}
|
|
396
396
|
|
|
397
397
|
/**
|
|
398
|
-
* Forced
|
|
398
|
+
* Forced colors flatten a background to `Canvas`, and a rule painted with
|
|
399
399
|
* one disappears with it. The separator is a background rather than a border,
|
|
400
400
|
* so keeping the paint is the only way the boundary is still there to read.
|
|
401
401
|
*/
|
package/src/tooltip/tooltip.css
CHANGED
|
@@ -334,7 +334,7 @@
|
|
|
334
334
|
*
|
|
335
335
|
* ── Why it is painted over the surface and not behind it ─────────────
|
|
336
336
|
*
|
|
337
|
-
* The square is rotated about its own
|
|
337
|
+
* The square is rotated about its own center, and the center sits on the
|
|
338
338
|
* content's edge. Painted behind, its inner half disappears and the content's
|
|
339
339
|
* own border still runs straight across the base — a bordered tooltip then
|
|
340
340
|
* reads as a box with a separate triangle hanging off it, which is what the
|
|
@@ -298,7 +298,7 @@
|
|
|
298
298
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
/** A square the mark is
|
|
301
|
+
/** A square the mark is centerd in, the height of the bar's controls. */
|
|
302
302
|
[data-ui-top-navigation] [data-part-mark] {
|
|
303
303
|
align-items: center;
|
|
304
304
|
block-size: var(--_control-height);
|
|
@@ -711,9 +711,9 @@
|
|
|
711
711
|
* the bell instead, it was 14 pixels holding 10-pixel semibold figures with
|
|
712
712
|
* two pixels of inset, and the figures were crushed against the edge.
|
|
713
713
|
*
|
|
714
|
-
* A block container rather than a flex one: a flex container
|
|
714
|
+
* A block container rather than a flex one: a flex container centers the
|
|
715
715
|
* line box, which is not symmetric around the figures inside it, and the
|
|
716
|
-
* figures sat high. `align-content`
|
|
716
|
+
* figures sat high. `align-content` centers the one line, and the trim
|
|
717
717
|
* below makes that line the ink.
|
|
718
718
|
*/
|
|
719
719
|
[data-ui-top-navigation] [data-part-count] {
|
|
@@ -732,7 +732,7 @@
|
|
|
732
732
|
font-variant-numeric: tabular-nums;
|
|
733
733
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
734
734
|
inset-block-start: calc(var(--_count-inset) - var(--_count-size) / 2);
|
|
735
|
-
/* Its
|
|
735
|
+
/* Its center on the bell's top-end corner, so the disc covers a corner of the mark and no more; a pill of three ends inside the account's halo. */
|
|
736
736
|
inset-inline-start: calc(100% - var(--_count-inset) - var(--_count-size) / 2);
|
|
737
737
|
line-height: 1;
|
|
738
738
|
min-inline-size: var(--_count-size);
|
|
@@ -744,7 +744,7 @@
|
|
|
744
744
|
z-index: 1;
|
|
745
745
|
}
|
|
746
746
|
|
|
747
|
-
/** What is
|
|
747
|
+
/** What is centerd is the ink rather than the font's metrics, as `badge` and `avatar` do it. */
|
|
748
748
|
@supports (text-box: trim-both cap alphabetic) {
|
|
749
749
|
[data-ui-top-navigation] [data-part-count] {
|
|
750
750
|
text-box: trim-both cap alphabetic;
|
|
@@ -759,10 +759,10 @@
|
|
|
759
759
|
* does. What stands inside it is the consumer's field.
|
|
760
760
|
*
|
|
761
761
|
* It stands at the start of the middle, and the free space is between it
|
|
762
|
-
* and the actions. It was
|
|
763
|
-
* are never the same width, so the field stood off the bar's
|
|
762
|
+
* and the actions. It was centerd in that space, and the two end clusters
|
|
763
|
+
* are never the same width, so the field stood off the bar's center by half
|
|
764
764
|
* their difference — twenty pixels in the first demo capture, aligned with
|
|
765
|
-
* nothing.
|
|
765
|
+
* nothing. Centering on the bar itself needs the two clusters laid out as
|
|
766
766
|
* one grid track each, which is not this family's tree; what a field at the
|
|
767
767
|
* start of the middle aligns with is the brand it follows.
|
|
768
768
|
*/
|
|
@@ -1234,7 +1234,7 @@
|
|
|
1234
1234
|
}
|
|
1235
1235
|
}
|
|
1236
1236
|
|
|
1237
|
-
/* ── Forced
|
|
1237
|
+
/* ── Forced colors ─────────────────────────────────────────────────────── */
|
|
1238
1238
|
|
|
1239
1239
|
@media (forced-colors: active) {
|
|
1240
1240
|
[data-ui-top-navigation]
|