actual-css 0.20.1 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +105 -0
- package/README.md +6 -6
- package/components.json +29 -7
- package/dist/actual.full.css +542 -135
- package/dist/actual.full.js +2 -2
- package/dist/actual.full.min.css +1 -1
- package/dist/types/data-flag.d.ts +1 -0
- package/dist/types/enhancement-loader-state.d.ts +6 -0
- package/dist/types/enhancement-loader.d.ts +0 -2
- package/dist/types/parse-config.d.ts +0 -1
- package/dist/types/popover-transport.d.ts +2 -0
- package/dist/types/status.d.ts +0 -1
- package/dist/types/tooltip.d.ts +4 -0
- package/dist/types/validation.d.ts +6 -2
- package/docs/pages/components/app-navigation.md +67 -0
- package/docs/pages/components/button.md +3 -0
- package/docs/pages/components/dialog.md +3 -0
- package/docs/pages/components/list.md +13 -0
- package/docs/pages/components/meter.md +1 -0
- package/docs/pages/components/progress.md +1 -0
- package/docs/pages/components/segmented.md +7 -4
- package/docs/pages/components/table.md +4 -1
- package/docs/pages/components/timeline.md +32 -0
- package/docs/pages/enhancements/flyout.md +12 -3
- package/docs/pages/enhancements/tooltip.md +6 -1
- package/docs/pages/examples/overview.md +30 -1
- package/docs/pages/forms/combobox.md +14 -10
- package/docs/pages/forms/labels.md +7 -0
- package/docs/pages/forms/overview.md +13 -10
- package/docs/pages/forms/range.md +3 -1
- package/docs/pages/forms/validation.md +3 -3
- package/docs/pages/foundations/philosophy.md +26 -0
- package/docs/pages/foundations/theming.md +80 -7
- package/docs/pages/foundations/tokens.md +39 -2
- package/docs/pages/guides/coding-agents.md +11 -0
- package/docs/pages/guides/introduction.md +1 -1
- package/docs/pages/guides/progressive-enhancement.md +109 -19
- package/docs/pages/guides/tailwind.md +12 -6
- package/docs/pages/guides/upgrading.md +52 -0
- package/docs/pages/layout/app-layout.md +50 -1
- package/docs/pages/patterns/empty-state.md +48 -10
- package/forms.json +325 -0
- package/llms.txt +2 -1
- package/package.json +3 -1
- package/reserved-classes.json +2 -0
- package/skills/actual-css/SKILL.md +1 -1
- package/skills/actual-css/references/api-and-vocabulary.md +2 -1
- package/src/cli/actual-css.js +8 -2
- package/src/css/components/app-nav.css +75 -18
- package/src/css/components/avatar.css +1 -0
- package/src/css/components/badge.css +7 -1
- package/src/css/components/button.css +20 -3
- package/src/css/components/flyout.css +8 -2
- package/src/css/components/list.css +28 -13
- package/src/css/components/menu.css +18 -0
- package/src/css/components/meter.css +11 -6
- package/src/css/components/progress.css +14 -6
- package/src/css/components/rating.css +2 -0
- package/src/css/components/segmented.css +22 -12
- package/src/css/components/table.css +21 -2
- package/src/css/components/timeline.css +50 -1
- package/src/css/core/theme.css +11 -1
- package/src/css/core/tokens.css +20 -2
- package/src/css/forms/choice-card.css +6 -4
- package/src/css/forms/choice.css +28 -16
- package/src/css/forms/control.css +23 -16
- package/src/css/forms/custom-select.css +3 -1
- package/src/css/forms/form.css +8 -5
- package/src/css/forms/otp.css +7 -1
- package/src/css/forms/range.css +31 -11
- package/src/css/forms/select.css +13 -4
- package/src/css/forms/switch.css +11 -5
- package/src/css/layout/app-layout.css +104 -5
- package/src/js/data-flag.js +4 -0
- package/src/js/dialog.js +24 -8
- package/src/js/enhancement-loader-state.js +7 -0
- package/src/js/enhancement-loader.js +4 -21
- package/src/js/keys.js +5 -7
- package/src/js/parse-config.js +0 -2
- package/src/js/popover-transport.js +18 -0
- package/src/js/status.js +0 -2
- package/src/js/surface.js +35 -41
- package/src/js/tooltip.js +70 -36
- package/src/js/validation.js +24 -10
- package/src/tooling/css-bundle.js +5 -0
- package/src/tooling/design-tokens.js +9 -2
- package/src/tooling/theme-contrast.js +45 -17
- package/tokens.json +5 -0
package/dist/actual.full.css
CHANGED
|
@@ -129,6 +129,17 @@ dialog:not([open]) {
|
|
|
129
129
|
--radius-full: 9999px;
|
|
130
130
|
--shadow: 0 1px 3px rgb(0 0 0 / 0.05), 0 4px 12px rgb(0 0 0 / 0.04);
|
|
131
131
|
--shadow-popout: 0 0.25rem 0.75rem rgb(0 0 0 / 0.15);
|
|
132
|
+
/* Control-scale relief, unset so the default theme stays flat: a theme sets
|
|
133
|
+
them on its root. --shadow-control lifts the part that moves on a rail
|
|
134
|
+
(selected segment, switch knob, range thumb), where --shadow's blur reads
|
|
135
|
+
as a smudge; --shadow-inset recesses fields and rails. Both enter shadow
|
|
136
|
+
lists, so a theme flattens them with 0 0 #0000, never none. */
|
|
137
|
+
--shadow-control: initial;
|
|
138
|
+
--shadow-inset: initial;
|
|
139
|
+
/* Finish, unset so the default theme stays matte: a background-image every
|
|
140
|
+
solid fill (button, checked choice and switch, progress value, solid
|
|
141
|
+
badge) layers over its color. Keep it a translucent neutral veil. */
|
|
142
|
+
--finish: initial;
|
|
132
143
|
|
|
133
144
|
/* Motion — see reset.css for the prefers-reduced-motion hard reset.
|
|
134
145
|
--duration scales component transitions (hover/focus); the dedicated
|
|
@@ -174,6 +185,10 @@ dialog:not([open]) {
|
|
|
174
185
|
the same geometry. Public: set it on the element or on an application
|
|
175
186
|
class rather than reaching for a size variant. */
|
|
176
187
|
--bar-height: 0.65rem;
|
|
188
|
+
/* Their corner, track and value alike. The value is drawn on vendor
|
|
189
|
+
pseudo-elements a theme cannot reach in one rule, so this is the way to
|
|
190
|
+
square a bar. */
|
|
191
|
+
--bar-radius: var(--radius-full);
|
|
177
192
|
|
|
178
193
|
/* Controls — inputs and buttons share --control-size so heights always match.
|
|
179
194
|
.compact/.spacious (variants.css) switch geometry (--control-size,
|
|
@@ -281,9 +296,12 @@ dialog:not([open]) {
|
|
|
281
296
|
when a tinted or translucent surface pulls the edge under 3:1. */
|
|
282
297
|
--border-control-mix: 45%;
|
|
283
298
|
|
|
284
|
-
/* Shared icon assets. Override these URLs when a strict CSP disallows data:.
|
|
299
|
+
/* Shared icon assets. Override these URLs when a strict CSP disallows data:.
|
|
300
|
+
--icon-check is every checked state's mark (checkbox, choice card, chip,
|
|
301
|
+
menu, picker), drawn as a mask in the ink of its context: replace it to
|
|
302
|
+
restyle them all. Its 3-unit stroke draws 2px at 1em. */
|
|
285
303
|
--icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238a8594' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
|
|
286
|
-
--icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='
|
|
304
|
+
--icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
|
|
287
305
|
--icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3C/svg%3E");
|
|
288
306
|
--icon-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E");
|
|
289
307
|
|
|
@@ -362,7 +380,8 @@ dialog:not([open]) {
|
|
|
362
380
|
* Exception: --surface-opaque and --surface-solid-fg are public; a theme with
|
|
363
381
|
* translucent surfaces overrides them with opaque values. --border-control is
|
|
364
382
|
* public too: the resting edge of a neutral control, apart from structural
|
|
365
|
-
* separators. --control-default-bg
|
|
383
|
+
* separators. --control-default-bg and --control-default-border are the
|
|
384
|
+
* inherited resting field fill and edge.
|
|
366
385
|
*
|
|
367
386
|
* Internal:
|
|
368
387
|
* --hgroup-gap
|
|
@@ -488,6 +507,12 @@ dialog:not([open]) {
|
|
|
488
507
|
/* Inherited resting field fill, shared with external control bridges.
|
|
489
508
|
Component state rules still own readonly, disabled and invalid fills. */
|
|
490
509
|
--control-default-bg: var(--surface);
|
|
510
|
+
/* Inherited resting field edge: the quiet --border, like a neutral outline
|
|
511
|
+
button. A known WCAG 1.4.11 trade-off: on a fill equal to the surface the
|
|
512
|
+
field reads by its label and place, not a 3:1 edge (actual-css contrast
|
|
513
|
+
warns). Increased contrast restores --border-control below; a product
|
|
514
|
+
that needs strong identification everywhere sets it on :root. */
|
|
515
|
+
--control-default-border: var(--border);
|
|
491
516
|
}
|
|
492
517
|
|
|
493
518
|
/* Custom properties accept unknown functions, so guard the pair to preserve
|
|
@@ -620,6 +645,9 @@ dialog:not([open]) {
|
|
|
620
645
|
--focus-ring-width: 3px;
|
|
621
646
|
--text-muted: var(--text);
|
|
622
647
|
--text-subtle: var(--text);
|
|
648
|
+
/* Fields are identified by a 3:1 edge again, quiet or borderless themes
|
|
649
|
+
included. */
|
|
650
|
+
--control-default-border: var(--border-control);
|
|
623
651
|
}
|
|
624
652
|
}
|
|
625
653
|
|
|
@@ -1665,11 +1693,19 @@ mark {
|
|
|
1665
1693
|
*
|
|
1666
1694
|
* Docs: docs/pages/layout/app-layout.md
|
|
1667
1695
|
*
|
|
1696
|
+
* data-nav="rail" is the application's desktop preference for a captioned rail.
|
|
1697
|
+
* It only changes the side presentation; the bottom bar ignores it. Setting,
|
|
1698
|
+
* toggling and persisting it belong to the application.
|
|
1699
|
+
*
|
|
1668
1700
|
* Public hooks:
|
|
1669
1701
|
* --app-nav-side-size
|
|
1702
|
+
* --app-nav-rail-size
|
|
1703
|
+
* --app-layout-bar-size
|
|
1670
1704
|
*/
|
|
1671
1705
|
.app-layout {
|
|
1672
1706
|
--app-nav-side-size: 12rem;
|
|
1707
|
+
--app-nav-rail-size: 5.5rem;
|
|
1708
|
+
--app-layout-bar-size: calc(var(--control-size) + var(--space-30) * 2);
|
|
1673
1709
|
|
|
1674
1710
|
display: grid;
|
|
1675
1711
|
grid-template:
|
|
@@ -1716,23 +1752,68 @@ mark {
|
|
|
1716
1752
|
/ var(--app-nav-side-size) minmax(0, 1fr);
|
|
1717
1753
|
}
|
|
1718
1754
|
|
|
1755
|
+
/* A column, not grid rows: the footer takes the free space above it with an
|
|
1756
|
+
auto margin. Scrolls on its own when the destinations outgrow a short
|
|
1757
|
+
viewport, so the footer follows the last link instead of covering it. */
|
|
1758
|
+
/* Where the brand lives decides who owns the top-left corner. A nav header
|
|
1759
|
+
claims it, and the nav runs the full height; without one the brand is in
|
|
1760
|
+
the topbar, which then spans the navigation as a global bar. Areas only:
|
|
1761
|
+
columns stay with the rules above and the rail's, which this selector
|
|
1762
|
+
would outweigh. Without :has() the nav keeps the full height. */
|
|
1763
|
+
.app-layout:not(:has(> .app-nav > header)) {
|
|
1764
|
+
grid-template-areas:
|
|
1765
|
+
"topbar topbar"
|
|
1766
|
+
"nav main";
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1719
1769
|
.app-layout > .app-nav {
|
|
1720
1770
|
position: sticky;
|
|
1721
1771
|
inset-block: 0;
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
grid-auto-columns: auto;
|
|
1725
|
-
align-content: start;
|
|
1772
|
+
display: flex;
|
|
1773
|
+
flex-direction: column;
|
|
1726
1774
|
gap: var(--space-20);
|
|
1727
1775
|
min-block-size: 0;
|
|
1728
1776
|
padding-block: max(var(--space-20), env(safe-area-inset-top))
|
|
1729
1777
|
max(var(--space-20), env(safe-area-inset-bottom));
|
|
1730
1778
|
padding-inline: var(--space-20);
|
|
1779
|
+
overflow-y: auto;
|
|
1731
1780
|
border-block-start: 0;
|
|
1732
1781
|
border-inline-end: var(--border-width) solid var(--ui-border, var(--border));
|
|
1733
1782
|
}
|
|
1734
1783
|
|
|
1735
|
-
|
|
1784
|
+
/* An explicit tile min-size would otherwise let an overflowing column
|
|
1785
|
+
shrink a two-line label below its content. */
|
|
1786
|
+
.app-layout > .app-nav > * {
|
|
1787
|
+
flex: none;
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
.app-layout > .app-nav > :is(header, footer) {
|
|
1791
|
+
display: grid;
|
|
1792
|
+
gap: var(--space-20);
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
/* The nav spans both rows, so its header cannot read the topbar's height.
|
|
1796
|
+
Both share one band instead: the header's first row (the brand) centres
|
|
1797
|
+
on the topbar's line, a primary action stacks below it, and the first
|
|
1798
|
+
destination starts below the band, level with the main region. */
|
|
1799
|
+
.app-layout > .topbar {
|
|
1800
|
+
min-block-size: calc(var(--app-layout-bar-size) + env(safe-area-inset-top));
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
.app-layout > .app-nav > header {
|
|
1804
|
+
grid-template-rows: var(--app-layout-bar-size);
|
|
1805
|
+
align-items: center;
|
|
1806
|
+
/* Starts at the nav's border edge, as the topbar does at the viewport's:
|
|
1807
|
+
cancels the nav's top padding and re-adds the inset above the band. */
|
|
1808
|
+
margin-block-start: calc(max(var(--space-20), env(safe-area-inset-top)) * -1);
|
|
1809
|
+
padding-block-start: env(safe-area-inset-top);
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
.app-layout > .app-nav > footer {
|
|
1813
|
+
margin-block-start: auto;
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1816
|
+
.app-layout > .app-nav > :is(a, button) {
|
|
1736
1817
|
grid-template-rows: auto;
|
|
1737
1818
|
grid-template-columns: 1.5rem minmax(0, 1fr);
|
|
1738
1819
|
place-content: center start;
|
|
@@ -1740,9 +1821,55 @@ mark {
|
|
|
1740
1821
|
justify-items: start;
|
|
1741
1822
|
gap: var(--space-30);
|
|
1742
1823
|
padding-inline: var(--space-30);
|
|
1824
|
+
/* The xs caption suits a label under an icon in a cramped bar; beside the
|
|
1825
|
+
icon it reads as a navigation link, at body size like .nav-link. */
|
|
1826
|
+
font-size: inherit;
|
|
1743
1827
|
text-align: start;
|
|
1744
1828
|
}
|
|
1745
1829
|
|
|
1830
|
+
/* A labelled row is the target itself: the state fills the whole row and
|
|
1831
|
+
the icon drops its pill (app-nav.css), back to a plain glyph. */
|
|
1832
|
+
.app-layout:not([data-nav="rail"]) > .app-nav > :is(a, button) {
|
|
1833
|
+
background: var(--app-nav-fill, transparent);
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
.app-layout:not([data-nav="rail"]) > .app-nav > a[aria-current="page"] {
|
|
1837
|
+
color: var(--app-nav-ink);
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
.app-layout:not([data-nav="rail"])
|
|
1841
|
+
> .app-nav
|
|
1842
|
+
> :is(a, button)
|
|
1843
|
+
> :where(svg, img, [aria-hidden="true"]) {
|
|
1844
|
+
padding: 0;
|
|
1845
|
+
background: none;
|
|
1846
|
+
color: inherit;
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
.app-layout[data-nav="rail"] {
|
|
1850
|
+
grid-template-columns: var(--app-nav-rail-size) minmax(0, 1fr);
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
/* The rail keeps a caption under each icon, the bottom bar's tile turned
|
|
1854
|
+
upright: a visible label needs no tooltip and names the tile for everyone.
|
|
1855
|
+
The track fits single-word xs captions ("Notifications" measured 76px),
|
|
1856
|
+
with the nav's inline padding narrowed so the tile keeps that width; two
|
|
1857
|
+
words wrap onto a second line. */
|
|
1858
|
+
.app-layout[data-nav="rail"] > .app-nav {
|
|
1859
|
+
padding-inline: var(--space-10);
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
.app-layout[data-nav="rail"] > .app-nav > :is(a, button) {
|
|
1863
|
+
grid-template-rows: auto auto;
|
|
1864
|
+
grid-template-columns: auto;
|
|
1865
|
+
place-content: center;
|
|
1866
|
+
justify-items: center;
|
|
1867
|
+
gap: var(--space-10);
|
|
1868
|
+
padding: var(--space-10) 0;
|
|
1869
|
+
font-size: var(--font-size-xs);
|
|
1870
|
+
text-align: center;
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1746
1873
|
/* In the side layout the FAB owns the viewport's bottom safe-area inset. */
|
|
1747
1874
|
.app-layout > .fab {
|
|
1748
1875
|
margin-block-end: max(var(--fab-offset), env(safe-area-inset-bottom));
|
|
@@ -2325,6 +2452,7 @@ mark {
|
|
|
2325
2452
|
* .field-group.flush, .required-mark.
|
|
2326
2453
|
*
|
|
2327
2454
|
* Public hooks:
|
|
2455
|
+
* --field-label-scale
|
|
2328
2456
|
* --fieldset-legend-padding-inline
|
|
2329
2457
|
*/
|
|
2330
2458
|
.field {
|
|
@@ -2352,12 +2480,14 @@ mark {
|
|
|
2352
2480
|
own size the hierarchy rested on weight alone, and a stack of medium
|
|
2353
2481
|
labels read louder than the fields. Medium and the full ink keep it a
|
|
2354
2482
|
clear read. A fraction of --control-font-size, not a fixed step, so it
|
|
2355
|
-
follows .sm/.lg on the .field whatever element holds the label.
|
|
2356
|
-
|
|
2357
|
-
|
|
2483
|
+
follows .sm/.lg on the .field whatever element holds the label.
|
|
2484
|
+
--field-label-scale is the author hook for that fraction (1 sets labels at
|
|
2485
|
+
the field text size); its fallback stays here, not on :root, so the hook
|
|
2486
|
+
can be set on any container. The legend titles a group, one level up, and
|
|
2487
|
+
is set small inside the frame, so it keeps the heavier weight. */
|
|
2358
2488
|
.field-label {
|
|
2359
2489
|
color: var(--text);
|
|
2360
|
-
font-size: calc(var(--control-font-size) * 0.875);
|
|
2490
|
+
font-size: calc(var(--control-font-size) * var(--field-label-scale, 0.875));
|
|
2361
2491
|
font-weight: var(--font-weight-medium);
|
|
2362
2492
|
}
|
|
2363
2493
|
|
|
@@ -2383,7 +2513,7 @@ mark {
|
|
|
2383
2513
|
.field-group.flush > legend {
|
|
2384
2514
|
margin-block-end: var(--space-10);
|
|
2385
2515
|
padding-inline: 0;
|
|
2386
|
-
font-size: calc(var(--control-font-size) * 0.875);
|
|
2516
|
+
font-size: calc(var(--control-font-size) * var(--field-label-scale, 0.875));
|
|
2387
2517
|
}
|
|
2388
2518
|
|
|
2389
2519
|
.field-help {
|
|
@@ -2425,9 +2555,12 @@ mark {
|
|
|
2425
2555
|
* underline-style lower edge instead of a uniform border.
|
|
2426
2556
|
*
|
|
2427
2557
|
* --control-default-border is the inherited resting edge, the twin of
|
|
2428
|
-
* --control-default-bg:
|
|
2429
|
-
*
|
|
2430
|
-
*
|
|
2558
|
+
* --control-default-bg: theme.css sets both (the quiet --border, and
|
|
2559
|
+
* --border-control under increased contrast), and a theme sets them on its
|
|
2560
|
+
* root, where --control-border itself is owned by the state rules below.
|
|
2561
|
+
* --border-control there is strong field identification; paired with the
|
|
2562
|
+
* lower-edge hook it puts the 3:1 cue on the bottom alone. The fallback below
|
|
2563
|
+
* is the strong edge, for a page that unsets the token.
|
|
2431
2564
|
* readonly and disabled reset the lower edge, so an inherited accent or 3:1
|
|
2432
2565
|
* underline never marks a field the user cannot edit.
|
|
2433
2566
|
*
|
|
@@ -2441,8 +2574,8 @@ mark {
|
|
|
2441
2574
|
* --control-shadow
|
|
2442
2575
|
* --control-border-block-end-color
|
|
2443
2576
|
* --control-border-block-end-width
|
|
2444
|
-
* --control-hover-border
|
|
2445
|
-
* --control-hover-bg
|
|
2577
|
+
* --control-hover-border
|
|
2578
|
+
* --control-hover-bg
|
|
2446
2579
|
*/
|
|
2447
2580
|
.input,
|
|
2448
2581
|
.textarea,
|
|
@@ -2467,10 +2600,11 @@ mark {
|
|
|
2467
2600
|
background: var(--control-bg);
|
|
2468
2601
|
color: var(--control-fg);
|
|
2469
2602
|
/* why: an unset hook, so a theme can give every field a resting elevation
|
|
2470
|
-
that focus keeps (see the focus rule)
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2603
|
+
that focus keeps (see the focus rule); --shadow-inset recesses fields and
|
|
2604
|
+
rails alike. The fallback is none, the same as the focus rule's: a
|
|
2605
|
+
transparent 0 0 shadow here made focus transition between two values and
|
|
2606
|
+
expose a phantom shadow mid-way. */
|
|
2607
|
+
box-shadow: var(--control-shadow, var(--shadow-inset, none));
|
|
2474
2608
|
font-size: var(--control-font-size);
|
|
2475
2609
|
cursor: var(--control-cursor);
|
|
2476
2610
|
/* No outline: none here — the core :focus fallback must survive for browsers
|
|
@@ -2490,13 +2624,16 @@ mark {
|
|
|
2490
2624
|
resize: vertical;
|
|
2491
2625
|
}
|
|
2492
2626
|
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2627
|
+
/* One hover for every field, so a select never answers differently from the
|
|
2628
|
+
input beside it: the edge darkens, and the fill changes once a theme sets
|
|
2629
|
+
--control-hover-bg (a theme that clears the hover edge, such as an
|
|
2630
|
+
underline or a borderless well, needs one). A readonly field is not
|
|
2631
|
+
editable, so it keeps its rest state. */
|
|
2632
|
+
.input:hover:not(:disabled, [readonly]),
|
|
2633
|
+
.textarea:hover:not(:disabled, [readonly]),
|
|
2498
2634
|
.select:hover:not(:disabled) {
|
|
2499
|
-
--control-
|
|
2635
|
+
--control-border: var(--control-hover-border, var(--text-subtle));
|
|
2636
|
+
--control-bg: var(--control-hover-bg, var(--control-default-bg, var(--surface)));
|
|
2500
2637
|
}
|
|
2501
2638
|
|
|
2502
2639
|
/* Field focus is an inset outline: offset = -width keeps every pixel inside
|
|
@@ -2511,7 +2648,7 @@ mark {
|
|
|
2511
2648
|
.select:focus-visible:not(:disabled) {
|
|
2512
2649
|
outline: var(--focus-ring-width) solid var(--form-invalid-border, var(--focus));
|
|
2513
2650
|
outline-offset: calc(var(--focus-ring-width) * -1);
|
|
2514
|
-
box-shadow: var(--control-shadow, none);
|
|
2651
|
+
box-shadow: var(--control-shadow, var(--shadow-inset, none));
|
|
2515
2652
|
}
|
|
2516
2653
|
|
|
2517
2654
|
.input[readonly],
|
|
@@ -2539,6 +2676,8 @@ mark {
|
|
|
2539
2676
|
/*
|
|
2540
2677
|
* Checkbox and radio controls.
|
|
2541
2678
|
*
|
|
2679
|
+
* Docs: docs/pages/forms/overview.md
|
|
2680
|
+
*
|
|
2542
2681
|
* Native inputs keep their behavior while sharing custom geometry, checked,
|
|
2543
2682
|
* focus, and disabled states across semantic forms and classed aliases. This
|
|
2544
2683
|
* file also owns the .choice label layout (input + label text) so the whole
|
|
@@ -2719,12 +2858,15 @@ mark {
|
|
|
2719
2858
|
transition: transform var(--duration);
|
|
2720
2859
|
}
|
|
2721
2860
|
|
|
2861
|
+
/* The check is --icon-check, the mark every checked state shares (cards,
|
|
2862
|
+
chips, menus, the picker), at 1em: a 24-unit icon with a 3-unit stroke
|
|
2863
|
+
draws 2px at 16px. Replace the token to restyle every check at once. */
|
|
2722
2864
|
.check::before {
|
|
2723
|
-
inline-size:
|
|
2724
|
-
block-size:
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2865
|
+
inline-size: 1em;
|
|
2866
|
+
block-size: 1em;
|
|
2867
|
+
background: currentColor;
|
|
2868
|
+
-webkit-mask: var(--icon-check) center / contain no-repeat;
|
|
2869
|
+
mask: var(--icon-check) center / contain no-repeat;
|
|
2728
2870
|
}
|
|
2729
2871
|
|
|
2730
2872
|
.radio::before {
|
|
@@ -2734,25 +2876,26 @@ mark {
|
|
|
2734
2876
|
background: currentColor;
|
|
2735
2877
|
}
|
|
2736
2878
|
|
|
2879
|
+
/* Checked is a solid fill, so it takes the theme finish like a solid button. */
|
|
2737
2880
|
.check:is(:checked, :indeterminate),
|
|
2738
2881
|
.radio:checked {
|
|
2739
2882
|
--choice-border: var(--intent, var(--state-selected));
|
|
2740
2883
|
--choice-bg: var(--intent, var(--state-selected));
|
|
2741
2884
|
--choice-mark: var(--intent-fg, var(--state-selected-fg));
|
|
2742
|
-
}
|
|
2743
2885
|
|
|
2744
|
-
|
|
2745
|
-
transform: translateY(-0.06em) rotate(-45deg) scale(1);
|
|
2886
|
+
background-image: var(--finish, none);
|
|
2746
2887
|
}
|
|
2747
2888
|
|
|
2889
|
+
/* The dash stays drawn: the same layer without the mask, flattened to a bar
|
|
2890
|
+
the check's stroke weight. */
|
|
2748
2891
|
.check:indeterminate::before {
|
|
2749
|
-
|
|
2892
|
+
-webkit-mask: none;
|
|
2893
|
+
mask: none;
|
|
2750
2894
|
inline-size: 0.6em;
|
|
2751
|
-
block-size:
|
|
2752
|
-
border-block-end: 2px solid currentColor;
|
|
2753
|
-
transform: scale(1);
|
|
2895
|
+
block-size: 2px;
|
|
2754
2896
|
}
|
|
2755
2897
|
|
|
2898
|
+
.check:is(:checked, :indeterminate)::before,
|
|
2756
2899
|
.radio:checked::before {
|
|
2757
2900
|
transform: scale(1);
|
|
2758
2901
|
}
|
|
@@ -2779,10 +2922,16 @@ mark {
|
|
|
2779
2922
|
opacity: 1;
|
|
2780
2923
|
}
|
|
2781
2924
|
|
|
2782
|
-
/* Forced colors
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
the
|
|
2925
|
+
/* Forced colors stay under UA control on the input host, which keeps platform
|
|
2926
|
+
contrast and focus. The marks are currentColor fills (the check a mask, the
|
|
2927
|
+
dash and dot plain), which the system remaps to Canvas, erasing the state:
|
|
2928
|
+
they opt out on the pseudo only, and inherit the host's forced ink. */
|
|
2929
|
+
@media (forced-colors: active) {
|
|
2930
|
+
.check::before,
|
|
2931
|
+
.radio::before {
|
|
2932
|
+
forced-color-adjust: none;
|
|
2933
|
+
}
|
|
2934
|
+
}
|
|
2786
2935
|
|
|
2787
2936
|
/*
|
|
2788
2937
|
* Select — chevron and appearance layer on top of the shared text-control
|
|
@@ -2798,17 +2947,25 @@ mark {
|
|
|
2798
2947
|
*
|
|
2799
2948
|
* Public hooks:
|
|
2800
2949
|
* --select-icon-size
|
|
2950
|
+
* --select-icon-inset
|
|
2801
2951
|
*/
|
|
2802
2952
|
/* --select-icon-size is typographic (em), so the reserved slot and the
|
|
2803
2953
|
pictogram scale with the control's font size, not a fixed rem sliver. */
|
|
2804
2954
|
.select:not(:is([multiple], [size]:not([size="1"]))) {
|
|
2805
2955
|
--select-icon-size: 1em;
|
|
2956
|
+
/* why: optical, not geometric. The chevron is drawn on the middle half of
|
|
2957
|
+
its box (6..18 of 24), so a box at the pad left its ink a quarter icon
|
|
2958
|
+
further in than the text on the other side and than the native date,
|
|
2959
|
+
time and search icons, which fill their box. Shifting the box by that
|
|
2960
|
+
margin puts the ink at the pad. A replacement --icon-chevron that fills
|
|
2961
|
+
its box sets this to the pad. */
|
|
2962
|
+
--select-icon-inset: calc(var(--control-pad-x) - var(--select-icon-size) * 0.25);
|
|
2806
2963
|
|
|
2807
2964
|
appearance: none;
|
|
2808
2965
|
-webkit-appearance: none;
|
|
2809
2966
|
padding-inline-end: calc(var(--control-pad-x) * 2 + var(--select-icon-size));
|
|
2810
2967
|
background-image: var(--icon-chevron);
|
|
2811
|
-
background-position: center right var(--
|
|
2968
|
+
background-position: center right var(--select-icon-inset);
|
|
2812
2969
|
background-size: var(--select-icon-size) auto;
|
|
2813
2970
|
background-repeat: no-repeat;
|
|
2814
2971
|
}
|
|
@@ -2820,15 +2977,15 @@ mark {
|
|
|
2820
2977
|
directionality, so the explicit ltr rule neutralizes an outer RTL fallback
|
|
2821
2978
|
for a nested direction change. */
|
|
2822
2979
|
[dir="rtl"] .select:not(:is([multiple], [size]:not([size="1"]))) {
|
|
2823
|
-
background-position: center left var(--
|
|
2980
|
+
background-position: center left var(--select-icon-inset);
|
|
2824
2981
|
}
|
|
2825
2982
|
|
|
2826
2983
|
.select:not(:is([multiple], [size]:not([size="1"]))):dir(ltr) {
|
|
2827
|
-
background-position: center right var(--
|
|
2984
|
+
background-position: center right var(--select-icon-inset);
|
|
2828
2985
|
}
|
|
2829
2986
|
|
|
2830
2987
|
.select:not(:is([multiple], [size]:not([size="1"]))):dir(rtl) {
|
|
2831
|
-
background-position: center left var(--
|
|
2988
|
+
background-position: center left var(--select-icon-inset);
|
|
2832
2989
|
}
|
|
2833
2990
|
|
|
2834
2991
|
/* Both forced-colors and prefers-contrast hand the arrow back to the
|
|
@@ -2838,6 +2995,7 @@ mark {
|
|
|
2838
2995
|
@media (forced-colors: active), (prefers-contrast: more) {
|
|
2839
2996
|
.select:not(:is([multiple], [size]:not([size="1"]))) {
|
|
2840
2997
|
appearance: auto;
|
|
2998
|
+
-webkit-appearance: auto;
|
|
2841
2999
|
background-image: none;
|
|
2842
3000
|
padding-inline-end: var(--control-pad-x);
|
|
2843
3001
|
}
|
|
@@ -3279,6 +3437,8 @@ mark {
|
|
|
3279
3437
|
border: var(--border-width) solid var(--form-invalid-border, var(--switch-border));
|
|
3280
3438
|
border-radius: var(--radius-full);
|
|
3281
3439
|
background: var(--switch-bg);
|
|
3440
|
+
/* A rail, recessed with the fields when a theme sets --shadow-inset. */
|
|
3441
|
+
box-shadow: var(--shadow-inset, none);
|
|
3282
3442
|
appearance: none;
|
|
3283
3443
|
-webkit-appearance: none;
|
|
3284
3444
|
cursor: pointer;
|
|
@@ -3299,11 +3459,11 @@ mark {
|
|
|
3299
3459
|
}
|
|
3300
3460
|
}
|
|
3301
3461
|
|
|
3302
|
-
/*
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
against the track is what makes
|
|
3462
|
+
/* Never --shadow on the knob: it is a surface elevation (card, modal, drawer,
|
|
3463
|
+
fab), and at this size its 12px blur reads as a smudge that spills past the
|
|
3464
|
+
rail while carrying no state. A theme lifts it with the control-scale
|
|
3465
|
+
--shadow-control; unset, the knob stays flat and the concentric inset
|
|
3466
|
+
against the track is what makes it legible. */
|
|
3307
3467
|
.switch::before {
|
|
3308
3468
|
content: "";
|
|
3309
3469
|
/* Out of flow like the checkbox mark, so the track carries no in-flow item
|
|
@@ -3319,6 +3479,7 @@ mark {
|
|
|
3319
3479
|
block-size: var(--switch-knob-size);
|
|
3320
3480
|
border-radius: var(--radius-full);
|
|
3321
3481
|
background: var(--switch-knob);
|
|
3482
|
+
box-shadow: var(--shadow-control, none);
|
|
3322
3483
|
transition:
|
|
3323
3484
|
transform var(--duration),
|
|
3324
3485
|
background-color var(--duration);
|
|
@@ -3332,10 +3493,13 @@ mark {
|
|
|
3332
3493
|
}
|
|
3333
3494
|
}
|
|
3334
3495
|
|
|
3496
|
+
/* The checked track is a solid fill: it takes the theme finish. */
|
|
3335
3497
|
.switch:checked {
|
|
3336
3498
|
--switch-bg: var(--intent, var(--state-selected));
|
|
3337
3499
|
--switch-border: var(--switch-bg);
|
|
3338
3500
|
--switch-knob: var(--intent-fg, var(--state-selected-fg));
|
|
3501
|
+
|
|
3502
|
+
background-image: var(--finish, none);
|
|
3339
3503
|
}
|
|
3340
3504
|
|
|
3341
3505
|
.switch:checked::before {
|
|
@@ -3396,7 +3560,9 @@ mark {
|
|
|
3396
3560
|
* are not reliably applied across browsers.
|
|
3397
3561
|
*
|
|
3398
3562
|
* Public hooks:
|
|
3399
|
-
* --range-thumb-size
|
|
3563
|
+
* --range-thumb-size (the thumb's block size, and the control's)
|
|
3564
|
+
* --range-thumb-inline-size
|
|
3565
|
+
* --range-thumb-radius
|
|
3400
3566
|
* --range-track-height
|
|
3401
3567
|
* --range-thumb-bg
|
|
3402
3568
|
* --range-track-bg
|
|
@@ -3414,6 +3580,10 @@ mark {
|
|
|
3414
3580
|
|
|
3415
3581
|
.range {
|
|
3416
3582
|
--range-thumb-size: 1.125rem;
|
|
3583
|
+
/* The thumb's shape, on vendor pseudo-elements a theme cannot reach in one
|
|
3584
|
+
rule. The focus ring is a box-shadow, so it follows both. */
|
|
3585
|
+
--range-thumb-inline-size: var(--range-thumb-size);
|
|
3586
|
+
--range-thumb-radius: var(--radius-full);
|
|
3417
3587
|
--range-track-height: 0.625rem;
|
|
3418
3588
|
--range-thumb-bg: var(--intent, var(--primary));
|
|
3419
3589
|
--range-track-bg: var(--border);
|
|
@@ -3448,6 +3618,7 @@ mark {
|
|
|
3448
3618
|
--range-fill-from: to left;
|
|
3449
3619
|
}
|
|
3450
3620
|
|
|
3621
|
+
/* A rail, recessed with the fields when a theme sets --shadow-inset. */
|
|
3451
3622
|
.range::-webkit-slider-runnable-track {
|
|
3452
3623
|
block-size: var(--range-track-height);
|
|
3453
3624
|
border-radius: var(--radius-full);
|
|
@@ -3456,6 +3627,7 @@ mark {
|
|
|
3456
3627
|
var(--range-fill-bg) var(--range-progress),
|
|
3457
3628
|
var(--range-track-bg) var(--range-progress)
|
|
3458
3629
|
);
|
|
3630
|
+
box-shadow: var(--shadow-inset, none);
|
|
3459
3631
|
}
|
|
3460
3632
|
|
|
3461
3633
|
.range::-moz-range-track {
|
|
@@ -3466,33 +3638,39 @@ mark {
|
|
|
3466
3638
|
var(--range-fill-bg) var(--range-progress),
|
|
3467
3639
|
var(--range-track-bg) var(--range-progress)
|
|
3468
3640
|
);
|
|
3641
|
+
box-shadow: var(--shadow-inset, none);
|
|
3469
3642
|
}
|
|
3470
3643
|
|
|
3471
3644
|
.range::-webkit-slider-thumb {
|
|
3472
3645
|
appearance: none;
|
|
3473
3646
|
-webkit-appearance: none;
|
|
3474
|
-
inline-size: var(--range-thumb-size);
|
|
3647
|
+
inline-size: var(--range-thumb-inline-size);
|
|
3475
3648
|
block-size: var(--range-thumb-size);
|
|
3476
|
-
border-radius: var(--radius
|
|
3649
|
+
border-radius: var(--range-thumb-radius);
|
|
3477
3650
|
border: 0;
|
|
3478
3651
|
background: var(--range-thumb-bg);
|
|
3479
3652
|
margin-block-start: calc((var(--range-track-height) - var(--range-thumb-size)) / 2);
|
|
3480
3653
|
cursor: inherit;
|
|
3481
3654
|
/* Permanent surface separator: the fill defaults to the thumb color, so
|
|
3482
3655
|
without this the thumb would melt into the filled part of the track.
|
|
3483
|
-
Focus-visible keeps this ring and adds the --focus ring outside it.
|
|
3484
|
-
|
|
3656
|
+
Focus-visible keeps this ring and adds the --focus ring outside it. A
|
|
3657
|
+
theme's --shadow-control comes last, under both rings. */
|
|
3658
|
+
box-shadow:
|
|
3659
|
+
0 0 0 2px var(--surface-opaque),
|
|
3660
|
+
var(--shadow-control, 0 0 #0000);
|
|
3485
3661
|
transition: box-shadow var(--duration);
|
|
3486
3662
|
}
|
|
3487
3663
|
|
|
3488
3664
|
.range::-moz-range-thumb {
|
|
3489
|
-
inline-size: var(--range-thumb-size);
|
|
3665
|
+
inline-size: var(--range-thumb-inline-size);
|
|
3490
3666
|
block-size: var(--range-thumb-size);
|
|
3491
|
-
border-radius: var(--radius
|
|
3667
|
+
border-radius: var(--range-thumb-radius);
|
|
3492
3668
|
border: 0;
|
|
3493
3669
|
background: var(--range-thumb-bg);
|
|
3494
3670
|
cursor: inherit;
|
|
3495
|
-
box-shadow:
|
|
3671
|
+
box-shadow:
|
|
3672
|
+
0 0 0 2px var(--surface-opaque),
|
|
3673
|
+
var(--shadow-control, 0 0 #0000);
|
|
3496
3674
|
transition: box-shadow var(--duration);
|
|
3497
3675
|
}
|
|
3498
3676
|
|
|
@@ -3511,13 +3689,15 @@ mark {
|
|
|
3511
3689
|
.range:focus-visible::-webkit-slider-thumb {
|
|
3512
3690
|
box-shadow:
|
|
3513
3691
|
0 0 0 2px var(--surface-opaque),
|
|
3514
|
-
0 0 0 calc(2px + var(--focus-ring-width)) var(--focus)
|
|
3692
|
+
0 0 0 calc(2px + var(--focus-ring-width)) var(--focus),
|
|
3693
|
+
var(--shadow-control, 0 0 #0000);
|
|
3515
3694
|
}
|
|
3516
3695
|
|
|
3517
3696
|
.range:focus-visible::-moz-range-thumb {
|
|
3518
3697
|
box-shadow:
|
|
3519
3698
|
0 0 0 2px var(--surface-opaque),
|
|
3520
|
-
0 0 0 calc(2px + var(--focus-ring-width)) var(--focus)
|
|
3699
|
+
0 0 0 calc(2px + var(--focus-ring-width)) var(--focus),
|
|
3700
|
+
var(--shadow-control, 0 0 #0000);
|
|
3521
3701
|
}
|
|
3522
3702
|
|
|
3523
3703
|
.range:disabled {
|
|
@@ -3535,7 +3715,9 @@ mark {
|
|
|
3535
3715
|
and would win the variable, leaving a Canvas-remapped fill.
|
|
3536
3716
|
The split lives in a background-image, which forced-color-adjust: auto
|
|
3537
3717
|
drops — so the tracks opt out locally. The colors stay system keywords,
|
|
3538
|
-
keeping native contrast adaptation; only the host keeps adjusting.
|
|
3718
|
+
keeping native contrast adaptation; only the host keeps adjusting. Opting
|
|
3719
|
+
out also keeps a theme's --shadow-inset, which the forced palette would
|
|
3720
|
+
drop everywhere else, hence the reset. */
|
|
3539
3721
|
@media (forced-colors: active) {
|
|
3540
3722
|
.range {
|
|
3541
3723
|
--range-track-bg: CanvasText;
|
|
@@ -3550,6 +3732,7 @@ mark {
|
|
|
3550
3732
|
Highlight var(--range-progress),
|
|
3551
3733
|
CanvasText var(--range-progress)
|
|
3552
3734
|
);
|
|
3735
|
+
box-shadow: none;
|
|
3553
3736
|
}
|
|
3554
3737
|
|
|
3555
3738
|
.range::-moz-range-track {
|
|
@@ -3559,6 +3742,7 @@ mark {
|
|
|
3559
3742
|
Highlight var(--range-progress),
|
|
3560
3743
|
CanvasText var(--range-progress)
|
|
3561
3744
|
);
|
|
3745
|
+
box-shadow: none;
|
|
3562
3746
|
}
|
|
3563
3747
|
.range::-webkit-slider-thumb {
|
|
3564
3748
|
background: ButtonFace;
|
|
@@ -3734,11 +3918,12 @@ mark {
|
|
|
3734
3918
|
border-radius: var(--radius-sm);
|
|
3735
3919
|
}
|
|
3736
3920
|
|
|
3737
|
-
/* Check mark
|
|
3921
|
+
/* Check mark: --icon-check, as on .check. 80% of the indicator is 1em at the
|
|
3922
|
+
default size, the checkbox's mark, and grows with a larger indicator. */
|
|
3738
3923
|
.choice-card::after {
|
|
3739
3924
|
background: var(--intent-fg, var(--state-selected-fg));
|
|
3740
|
-
-webkit-mask: var(--icon-check) center /
|
|
3741
|
-
mask: var(--icon-check) center /
|
|
3925
|
+
-webkit-mask: var(--icon-check) center / 80% no-repeat;
|
|
3926
|
+
mask: var(--icon-check) center / 80% no-repeat;
|
|
3742
3927
|
z-index: 2;
|
|
3743
3928
|
}
|
|
3744
3929
|
|
|
@@ -3791,7 +3976,8 @@ mark {
|
|
|
3791
3976
|
border: 0;
|
|
3792
3977
|
border-radius: inherit;
|
|
3793
3978
|
background: var(--text-subtle);
|
|
3794
|
-
transform:
|
|
3979
|
+
/* No transform here: the card's scale(0) keeps the dot hidden beside a
|
|
3980
|
+
visible native input until the :has() block above reveals it. */
|
|
3795
3981
|
clip-path: circle(0.1875em at var(--choice-chip-dot));
|
|
3796
3982
|
z-index: -1;
|
|
3797
3983
|
transition: clip-path var(--duration);
|
|
@@ -4034,6 +4220,8 @@ mark {
|
|
|
4034
4220
|
/*
|
|
4035
4221
|
* Customizable select — appearance: base-select picker enhancement.
|
|
4036
4222
|
*
|
|
4223
|
+
* Docs: docs/pages/forms/overview.md
|
|
4224
|
+
*
|
|
4037
4225
|
* Progressive enhancement on top of the native .select baseline in select.css.
|
|
4038
4226
|
* Wrapped in @supports and gated on fine pointer devices so it never blocks a
|
|
4039
4227
|
* layout. Add .native to a specific select to opt out.
|
|
@@ -4081,7 +4269,7 @@ mark {
|
|
|
4081
4269
|
--control-bg: var(--surface-raised);
|
|
4082
4270
|
outline: var(--focus-ring-width) solid var(--form-invalid-border, var(--focus));
|
|
4083
4271
|
outline-offset: calc(var(--focus-ring-width) * -1);
|
|
4084
|
-
box-shadow: var(--control-shadow, none);
|
|
4272
|
+
box-shadow: var(--control-shadow, var(--shadow-inset, none));
|
|
4085
4273
|
}
|
|
4086
4274
|
|
|
4087
4275
|
&::picker-icon {
|
|
@@ -4272,7 +4460,8 @@ mark {
|
|
|
4272
4460
|
--otp-cell-size: var(--control-size);
|
|
4273
4461
|
--otp-gap: var(--space-10);
|
|
4274
4462
|
--otp-font-size: 1.5em;
|
|
4275
|
-
|
|
4463
|
+
/* A text field per cell: the same resting edge as .input. */
|
|
4464
|
+
--otp-cell-border: var(--control-default-border, var(--border-control));
|
|
4276
4465
|
--otp-cell-bg: var(--surface);
|
|
4277
4466
|
--otp-caret-space: calc((var(--otp-cell-size) - 1ch) / 2 + var(--otp-gap) + 1px);
|
|
4278
4467
|
|
|
@@ -4322,6 +4511,11 @@ mark {
|
|
|
4322
4511
|
font-family: var(--font-mono);
|
|
4323
4512
|
font-size: var(--otp-font-size);
|
|
4324
4513
|
font-variant-numeric: tabular-nums;
|
|
4514
|
+
/* why: one glyph per cell. A code font (JetBrains Mono, Fira Code) joins
|
|
4515
|
+
`+++` or `->` through ligatures and contextual alternates; Chromium drops
|
|
4516
|
+
them under letter-spacing, Safari keeps them and the glyphs leave their
|
|
4517
|
+
cells. */
|
|
4518
|
+
font-variant-ligatures: none;
|
|
4325
4519
|
line-height: var(--otp-cell-size);
|
|
4326
4520
|
letter-spacing: calc(var(--otp-cell-size) + var(--otp-gap) - 1ch);
|
|
4327
4521
|
text-align: start;
|
|
@@ -4485,7 +4679,16 @@ mark {
|
|
|
4485
4679
|
);
|
|
4486
4680
|
border-block-end-width: var(--btn-border-block-end-width, var(--border-width));
|
|
4487
4681
|
border-radius: var(--btn-radius);
|
|
4488
|
-
|
|
4682
|
+
/* why: the fill is a color and the finish (--finish, the token every solid
|
|
4683
|
+
fill reads) an image layered over it, so a theme lights every intent the
|
|
4684
|
+
same way without restating its color, and the hover (a background-color
|
|
4685
|
+
change under an inset overlay) keeps the finish. --btn-bg must stay a
|
|
4686
|
+
color: an image there invalidates the declaration. From the border box,
|
|
4687
|
+
so a repeated tile does not show its bottom edge in the transparent
|
|
4688
|
+
border along the top. */
|
|
4689
|
+
background-color: var(--btn-bg);
|
|
4690
|
+
background-image: var(--finish, none);
|
|
4691
|
+
background-origin: border-box;
|
|
4489
4692
|
color: var(--btn-fg);
|
|
4490
4693
|
/* why: an unset hook rather than none, so a theme or container can give
|
|
4491
4694
|
every button an elevation the hover overlay composes with instead of
|
|
@@ -4565,6 +4768,14 @@ mark {
|
|
|
4565
4768
|
--btn-hover-overlay: transparent;
|
|
4566
4769
|
}
|
|
4567
4770
|
|
|
4771
|
+
/* A finish lights a solid fill: the recipes without one stay flat. A
|
|
4772
|
+
declaration, not a reset of --finish, so the token does not stop at the
|
|
4773
|
+
button for its content. A theme that wants a sheen on one of them paints
|
|
4774
|
+
its own background-image there. */
|
|
4775
|
+
.btn:is(.outline, .ghost, .link, .soft, .surface) {
|
|
4776
|
+
background-image: none;
|
|
4777
|
+
}
|
|
4778
|
+
|
|
4568
4779
|
/* Shared hover recipe — sets --ui-hover-bg consumed by the hover rule below.
|
|
4569
4780
|
Declared outside :hover: the variables resolve only when the hover rule
|
|
4570
4781
|
reads them, so the values are inert until interaction. */
|
|
@@ -4605,7 +4816,7 @@ mark {
|
|
|
4605
4816
|
/* The .soft/.outline/.ghost hover recipe (--ui-hover-bg) is set locally above;
|
|
4606
4817
|
the overlay darkening for solid is .btn-specific. */
|
|
4607
4818
|
.btn:not(:where(:disabled, [aria-disabled="true"])):hover {
|
|
4608
|
-
background: var(--ui-hover-bg, var(--btn-bg));
|
|
4819
|
+
background-color: var(--ui-hover-bg, var(--btn-bg));
|
|
4609
4820
|
/* Huge inset spread paints the overlay over any border-radius without a
|
|
4610
4821
|
pseudo-element; a plain background would replace the fill instead of
|
|
4611
4822
|
darkening it. Listed after --btn-shadow, which it must not drop. */
|
|
@@ -4645,7 +4856,7 @@ mark {
|
|
|
4645
4856
|
after components and overrides border-radius at equal specificity. */
|
|
4646
4857
|
|
|
4647
4858
|
.btn.link:not(:where(:disabled, [aria-disabled="true"])):hover {
|
|
4648
|
-
background: transparent;
|
|
4859
|
+
background-color: transparent;
|
|
4649
4860
|
text-decoration-thickness: 0.12em;
|
|
4650
4861
|
}
|
|
4651
4862
|
|
|
@@ -4965,6 +5176,11 @@ a.btn[aria-disabled="true"] {
|
|
|
4965
5176
|
--ui-border: initial;
|
|
4966
5177
|
}
|
|
4967
5178
|
|
|
5179
|
+
/* A solid pill takes the theme finish like a solid button. */
|
|
5180
|
+
.badge.solid {
|
|
5181
|
+
background-image: var(--finish, none);
|
|
5182
|
+
}
|
|
5183
|
+
|
|
4968
5184
|
.badge:empty {
|
|
4969
5185
|
--badge-size: var(--badge-dot-size);
|
|
4970
5186
|
--badge-bg: var(--intent, var(--neutral));
|
|
@@ -5032,8 +5248,9 @@ a.btn[aria-disabled="true"] {
|
|
|
5032
5248
|
}
|
|
5033
5249
|
}
|
|
5034
5250
|
|
|
5251
|
+
/* The color alone: the shorthand would drop a solid pill's finish. */
|
|
5035
5252
|
:where(a.badge, button.badge):not(:where(:disabled, [aria-disabled="true"])):hover {
|
|
5036
|
-
background: var(--ui-hover-bg, var(--badge-default-hover-bg));
|
|
5253
|
+
background-color: var(--ui-hover-bg, var(--badge-default-hover-bg));
|
|
5037
5254
|
}
|
|
5038
5255
|
|
|
5039
5256
|
/* Solid and empty badges keep the overlay darkening on hover; soft badges do
|
|
@@ -6363,13 +6580,16 @@ picture.bleed > img {
|
|
|
6363
6580
|
last row of a full-width sidebar nav list. Stretches both the
|
|
6364
6581
|
positioning wrapper and its trigger control. Named for the effect
|
|
6365
6582
|
(stretch to fill), not the display value, to avoid reading like a
|
|
6366
|
-
generic display-block utility.
|
|
6583
|
+
generic display-block utility. The trigger is matched by aria-controls,
|
|
6584
|
+
the runtime's own wiring: aria-haspopup="menu" follows role="menu" only, so
|
|
6585
|
+
a trigger for a panel holding a field (an account menu with a theme select)
|
|
6586
|
+
carries none and stayed content-sized. */
|
|
6367
6587
|
.flyout-trigger.stretch {
|
|
6368
6588
|
display: block;
|
|
6369
6589
|
inline-size: 100%;
|
|
6370
6590
|
}
|
|
6371
6591
|
|
|
6372
|
-
.flyout-trigger.stretch > [aria-
|
|
6592
|
+
.flyout-trigger.stretch > [aria-controls] {
|
|
6373
6593
|
inline-size: 100%;
|
|
6374
6594
|
}
|
|
6375
6595
|
|
|
@@ -6425,6 +6645,9 @@ picture.bleed > img {
|
|
|
6425
6645
|
.flyout[popover] {
|
|
6426
6646
|
position: fixed;
|
|
6427
6647
|
inset: auto;
|
|
6648
|
+
/* why: the UA's height: fit-content made Safari 18 size this grid to its
|
|
6649
|
+
max-block-size and spread the spare room between menu rows. */
|
|
6650
|
+
block-size: auto;
|
|
6428
6651
|
}
|
|
6429
6652
|
|
|
6430
6653
|
/* A presentation class may own its *visible* display type, but must not
|
|
@@ -6626,6 +6849,24 @@ picture.bleed > img {
|
|
|
6626
6849
|
text-overflow: ellipsis;
|
|
6627
6850
|
}
|
|
6628
6851
|
|
|
6852
|
+
.menu-item-text:where(:has(> .menu-item-desc)),
|
|
6853
|
+
.menu-item-desc {
|
|
6854
|
+
overflow-wrap: anywhere;
|
|
6855
|
+
white-space: normal;
|
|
6856
|
+
}
|
|
6857
|
+
|
|
6858
|
+
.menu-item-desc {
|
|
6859
|
+
display: block;
|
|
6860
|
+
color: var(--text-muted);
|
|
6861
|
+
font-size: 0.875em;
|
|
6862
|
+
}
|
|
6863
|
+
|
|
6864
|
+
/* Keep the leading icon aligned with the label when the description wraps. */
|
|
6865
|
+
.menu-item:where(:has(> .menu-item-text > .menu-item-desc)) {
|
|
6866
|
+
align-items: flex-start;
|
|
6867
|
+
padding-block: var(--space-10);
|
|
6868
|
+
}
|
|
6869
|
+
|
|
6629
6870
|
.menu-item-end {
|
|
6630
6871
|
display: inline-flex;
|
|
6631
6872
|
align-items: center;
|
|
@@ -7286,6 +7527,7 @@ picture.bleed > img {
|
|
|
7286
7527
|
* --progress-track
|
|
7287
7528
|
* --progress-value
|
|
7288
7529
|
* --bar-height
|
|
7530
|
+
* --bar-radius
|
|
7289
7531
|
*/
|
|
7290
7532
|
/* Intent boundary — inherited intents do not tint this component.
|
|
7291
7533
|
Local intent classes still win because :where() has zero specificity. */
|
|
@@ -7304,26 +7546,33 @@ picture.bleed > img {
|
|
|
7304
7546
|
block-size: var(--bar-height);
|
|
7305
7547
|
overflow: hidden;
|
|
7306
7548
|
border: 0;
|
|
7307
|
-
border-radius: var(--radius
|
|
7549
|
+
border-radius: var(--bar-radius);
|
|
7308
7550
|
background: var(--progress-track);
|
|
7551
|
+
/* A rail, recessed with the fields when a theme sets --shadow-inset. */
|
|
7552
|
+
box-shadow: var(--shadow-inset, none);
|
|
7309
7553
|
}
|
|
7310
7554
|
|
|
7555
|
+
/* The bar box paints over the host's inset shadow, so it carries it too. */
|
|
7311
7556
|
.progress::-webkit-progress-bar {
|
|
7312
7557
|
block-size: var(--bar-height);
|
|
7313
|
-
border-radius: var(--radius
|
|
7558
|
+
border-radius: var(--bar-radius);
|
|
7314
7559
|
background: var(--progress-track);
|
|
7560
|
+
box-shadow: var(--shadow-inset, none);
|
|
7315
7561
|
}
|
|
7316
7562
|
|
|
7563
|
+
/* The value is a solid fill: the theme finish is the layer over it. Two
|
|
7564
|
+
layers of one shorthand, so --progress-value may stay a color or become a
|
|
7565
|
+
gradient (only the last layer accepts a color). */
|
|
7317
7566
|
.progress::-webkit-progress-value {
|
|
7318
7567
|
block-size: var(--bar-height);
|
|
7319
|
-
border-radius: var(--radius
|
|
7320
|
-
background: var(--progress-value);
|
|
7568
|
+
border-radius: var(--bar-radius);
|
|
7569
|
+
background: var(--finish, none), var(--progress-value);
|
|
7321
7570
|
}
|
|
7322
7571
|
|
|
7323
7572
|
.progress::-moz-progress-bar {
|
|
7324
7573
|
block-size: var(--bar-height);
|
|
7325
|
-
border-radius: var(--radius
|
|
7326
|
-
background: var(--progress-value);
|
|
7574
|
+
border-radius: var(--bar-radius);
|
|
7575
|
+
background: var(--finish, none), var(--progress-value);
|
|
7327
7576
|
}
|
|
7328
7577
|
|
|
7329
7578
|
/* Indeterminate progress */
|
|
@@ -7587,6 +7836,7 @@ picture.bleed > img {
|
|
|
7587
7836
|
|
|
7588
7837
|
button.avatar {
|
|
7589
7838
|
appearance: none;
|
|
7839
|
+
-webkit-appearance: none;
|
|
7590
7840
|
cursor: pointer;
|
|
7591
7841
|
}
|
|
7592
7842
|
|
|
@@ -8127,6 +8377,7 @@ a.avatar[aria-disabled="true"] {
|
|
|
8127
8377
|
|
|
8128
8378
|
.rating > input[type="radio"] {
|
|
8129
8379
|
appearance: none;
|
|
8380
|
+
-webkit-appearance: none;
|
|
8130
8381
|
flex: 0 0 auto;
|
|
8131
8382
|
inline-size: calc(var(--rating-size) + var(--rating-gap));
|
|
8132
8383
|
/* Taller than the star: the hit area grows, the drawing does not. */
|
|
@@ -8272,6 +8523,7 @@ a.avatar[aria-disabled="true"] {
|
|
|
8272
8523
|
@media (forced-colors: active) {
|
|
8273
8524
|
.rating > input[type="radio"] {
|
|
8274
8525
|
appearance: auto;
|
|
8526
|
+
-webkit-appearance: auto;
|
|
8275
8527
|
inline-size: auto;
|
|
8276
8528
|
block-size: auto;
|
|
8277
8529
|
background: Canvas;
|
|
@@ -8716,7 +8968,8 @@ a.avatar[aria-disabled="true"] {
|
|
|
8716
8968
|
* block flow, so a sentence mixing text and links is never split into items.
|
|
8717
8969
|
*
|
|
8718
8970
|
* .timeline-dates-end moves every dateline to the inline end of the event's
|
|
8719
|
-
* first line, beside the title instead of above it.
|
|
8971
|
+
* first line, beside the title instead of above it. .timeline-dates-start sets
|
|
8972
|
+
* them in a shared column before the rail.
|
|
8720
8973
|
*
|
|
8721
8974
|
* Progress through a process is .steps, not a timeline.
|
|
8722
8975
|
*
|
|
@@ -8873,6 +9126,54 @@ a.avatar[aria-disabled="true"] {
|
|
|
8873
9126
|
font-size: calc(var(--timeline-line-box) / var(--line-height));
|
|
8874
9127
|
}
|
|
8875
9128
|
|
|
9129
|
+
/* Dates at the start: the datelines form a column before the rail, as in a
|
|
9130
|
+
log. The list owns three tracks (dateline, rail, event) and every event
|
|
9131
|
+
takes them as a subgrid, so the column is as wide as its longest dateline
|
|
9132
|
+
and every rail lines up. The marker, the segment and a slot stay absolutely
|
|
9133
|
+
positioned: placed in the rail track, that track becomes their containing
|
|
9134
|
+
block, and the offsets above hold unchanged.
|
|
9135
|
+
|
|
9136
|
+
Contract: after the <time>, every piece of the event is an element. A
|
|
9137
|
+
grid makes each run of bare text an item of its own, which could land in
|
|
9138
|
+
the dateline track.
|
|
9139
|
+
|
|
9140
|
+
Guarded: without subgrid these rules would leave each event a lone grid
|
|
9141
|
+
that scatters its children; the fallback is the default dateline above
|
|
9142
|
+
the title. */
|
|
9143
|
+
@supports (grid-template-columns: subgrid) {
|
|
9144
|
+
.timeline-dates-start {
|
|
9145
|
+
grid-template-columns: max-content var(--timeline-rail-size) minmax(0, 1fr);
|
|
9146
|
+
column-gap: var(--timeline-inline-gap);
|
|
9147
|
+
}
|
|
9148
|
+
|
|
9149
|
+
.timeline-dates-start > li {
|
|
9150
|
+
display: grid;
|
|
9151
|
+
grid-column: 1 / -1;
|
|
9152
|
+
grid-template-columns: subgrid;
|
|
9153
|
+
/* The smaller dateline shares the title's baseline on the first row. */
|
|
9154
|
+
align-items: first baseline;
|
|
9155
|
+
padding-inline-start: 0;
|
|
9156
|
+
}
|
|
9157
|
+
|
|
9158
|
+
.timeline-dates-start > li > * {
|
|
9159
|
+
grid-column: 3;
|
|
9160
|
+
}
|
|
9161
|
+
|
|
9162
|
+
/* Row 1, so the dateline sits beside the title rather than above it, and
|
|
9163
|
+
end-aligned, so ragged datelines hug the rail. */
|
|
9164
|
+
.timeline-dates-start > li > time {
|
|
9165
|
+
grid-row: 1;
|
|
9166
|
+
grid-column: 1;
|
|
9167
|
+
text-align: end;
|
|
9168
|
+
}
|
|
9169
|
+
|
|
9170
|
+
.timeline-dates-start > li::before,
|
|
9171
|
+
.timeline-dates-start > li::after,
|
|
9172
|
+
.timeline-dates-start > li > :is(.avatar, [aria-hidden="true"]):first-child {
|
|
9173
|
+
grid-column: 2;
|
|
9174
|
+
}
|
|
9175
|
+
}
|
|
9176
|
+
|
|
8876
9177
|
.timeline > li::before {
|
|
8877
9178
|
content: "";
|
|
8878
9179
|
position: absolute;
|
|
@@ -8972,10 +9273,21 @@ a.avatar[aria-disabled="true"] {
|
|
|
8972
9273
|
*
|
|
8973
9274
|
* Docs: docs/pages/components/app-navigation.md
|
|
8974
9275
|
*
|
|
9276
|
+
* Tiles are direct-child links and buttons (a "More" button opening a drawer,
|
|
9277
|
+
* a disabled destination). A direct-child header and footer, at most one each,
|
|
9278
|
+
* belong to the side presentation only (app-layout.css); the bottom bar has
|
|
9279
|
+
* room for destinations alone.
|
|
9280
|
+
*
|
|
8975
9281
|
* Public hooks:
|
|
8976
9282
|
* --app-nav-size
|
|
8977
9283
|
* --app-nav-gap
|
|
8978
9284
|
* --app-nav-icon-size
|
|
9285
|
+
* --app-nav-current-bg (fallback-only: current fill, icon pill or side row)
|
|
9286
|
+
* --app-nav-current-fg (fallback-only: ink on that fill)
|
|
9287
|
+
*
|
|
9288
|
+
* Internal:
|
|
9289
|
+
* --app-nav-fill (state fill, read by the icon pill or the whole tile)
|
|
9290
|
+
* --app-nav-ink (state ink on that fill)
|
|
8979
9291
|
*/
|
|
8980
9292
|
:where(.app-nav) {
|
|
8981
9293
|
--intent: initial;
|
|
@@ -9006,7 +9318,11 @@ a.avatar[aria-disabled="true"] {
|
|
|
9006
9318
|
color: var(--ui-fg, var(--text-muted));
|
|
9007
9319
|
}
|
|
9008
9320
|
|
|
9009
|
-
.app-nav >
|
|
9321
|
+
.app-nav > :is(header, footer) {
|
|
9322
|
+
display: none;
|
|
9323
|
+
}
|
|
9324
|
+
|
|
9325
|
+
.app-nav > :is(a, button) {
|
|
9010
9326
|
position: relative;
|
|
9011
9327
|
display: grid;
|
|
9012
9328
|
grid-template-rows: auto auto;
|
|
@@ -9028,41 +9344,83 @@ a.avatar[aria-disabled="true"] {
|
|
|
9028
9344
|
-webkit-tap-highlight-color: transparent;
|
|
9029
9345
|
}
|
|
9030
9346
|
|
|
9031
|
-
.app-nav >
|
|
9347
|
+
.app-nav > button {
|
|
9348
|
+
border: 0;
|
|
9349
|
+
background: none;
|
|
9350
|
+
font-family: inherit;
|
|
9351
|
+
cursor: pointer;
|
|
9352
|
+
}
|
|
9353
|
+
|
|
9354
|
+
.app-nav > button:disabled {
|
|
9355
|
+
cursor: not-allowed;
|
|
9356
|
+
opacity: var(--disabled-opacity);
|
|
9357
|
+
}
|
|
9358
|
+
|
|
9359
|
+
/* The fill hugs what it marks. Under a caption, a tile is mostly empty space,
|
|
9360
|
+
so its state paints a pill around the icon, not the tile: a full-tile fill
|
|
9361
|
+
read as a segmented control. States only set --app-nav-fill and
|
|
9362
|
+
--app-nav-ink; the presentation decides what reads them (the labelled side
|
|
9363
|
+
navigation paints the whole row, app-layout.css). Every icon carries the
|
|
9364
|
+
pill's geometry, so becoming current never moves it. */
|
|
9365
|
+
.app-nav > :is(a, button) > :where(svg, img, [aria-hidden="true"]) {
|
|
9366
|
+
box-sizing: content-box;
|
|
9032
9367
|
inline-size: var(--app-nav-icon-size);
|
|
9033
9368
|
block-size: var(--app-nav-icon-size);
|
|
9369
|
+
padding: var(--space-10) var(--space-40);
|
|
9370
|
+
border-radius: var(--radius-full);
|
|
9371
|
+
background: var(--app-nav-fill, transparent);
|
|
9372
|
+
color: var(--app-nav-ink, currentColor);
|
|
9034
9373
|
font-size: var(--app-nav-icon-size);
|
|
9035
9374
|
line-height: 1;
|
|
9036
9375
|
}
|
|
9037
9376
|
|
|
9038
|
-
.
|
|
9039
|
-
|
|
9377
|
+
/* A tile without an icon has nothing else to carry its state. Without :has()
|
|
9378
|
+
it shows the label color alone, and forced colors keep their frame. */
|
|
9379
|
+
.app-nav > :is(a, button):not(:has(> :where(svg, img, [aria-hidden="true"]))) {
|
|
9380
|
+
background: var(--app-nav-fill, transparent);
|
|
9381
|
+
}
|
|
9382
|
+
|
|
9383
|
+
/* :where() keeps hover below the current tile, as when tiles were links only:
|
|
9384
|
+
:is(button:enabled) would raise hover over a[aria-current] and repaint it. */
|
|
9385
|
+
.app-nav > :where(a, button:enabled):hover {
|
|
9386
|
+
--app-nav-fill: var(--surface-subtle);
|
|
9387
|
+
|
|
9040
9388
|
color: var(--text);
|
|
9041
9389
|
}
|
|
9042
9390
|
|
|
9043
9391
|
/* Same contextual hover as .nav-link (navbar.css): a tint of the tile's ink
|
|
9044
9392
|
reads on any --ui-* bar; the baseline keeps a legible light chip. */
|
|
9045
9393
|
@supports (color: color-mix(in oklch, red, white)) {
|
|
9046
|
-
.app-nav > a:hover {
|
|
9047
|
-
|
|
9394
|
+
.app-nav > :where(a, button:enabled):hover {
|
|
9395
|
+
--app-nav-fill: color-mix(in oklch, currentColor 10%, transparent);
|
|
9396
|
+
|
|
9048
9397
|
color: var(--ui-fg, var(--text));
|
|
9049
9398
|
}
|
|
9050
9399
|
}
|
|
9051
9400
|
|
|
9052
|
-
/*
|
|
9053
|
-
|
|
9054
|
-
|
|
9055
|
-
|
|
9056
|
-
|
|
9057
|
-
|
|
9058
|
-
|
|
9059
|
-
|
|
9060
|
-
|
|
9401
|
+
/* Selection never changes text metrics: the shared medium weight is kept. The
|
|
9402
|
+
label sits on the bar, not on the fill, so it takes the bar's full ink; the
|
|
9403
|
+
selected ink goes to what the fill paints. The forced-colors cue is a
|
|
9404
|
+
transparent border on a ::before overlay of the tile, not on the tile: an
|
|
9405
|
+
element border shrinks the content box, and the side layout starts its
|
|
9406
|
+
content at the inline edge, so the icon and label shifted by --border-width
|
|
9407
|
+
when a tile became current. The overlay costs no layout, yet forced colors
|
|
9408
|
+
still turn its transparent border into a system-color frame once the fill
|
|
9409
|
+
flattens to the bar's own Canvas. No forced-colors repaint: a Highlight fill
|
|
9410
|
+
put HighlightText on Chromium's Canvas backplate, which hid the label. The
|
|
9061
9411
|
positioning context is on every link so it does not move when one becomes
|
|
9062
|
-
current or an application places its own decoration.
|
|
9412
|
+
current or an application places its own decoration. A pale
|
|
9413
|
+
--app-nav-current-bg must still stand out from the nav surface: its
|
|
9414
|
+
contrast is the theme's to keep. */
|
|
9063
9415
|
.app-nav > a[aria-current="page"] {
|
|
9064
|
-
|
|
9065
|
-
|
|
9416
|
+
--app-nav-fill: var(--app-nav-current-bg, var(--state-selected));
|
|
9417
|
+
--app-nav-ink: var(--app-nav-current-fg, var(--state-selected-fg));
|
|
9418
|
+
|
|
9419
|
+
color: var(--ui-fg, var(--text));
|
|
9420
|
+
}
|
|
9421
|
+
|
|
9422
|
+
.app-nav > a[aria-current="page"]:not(:has(> :where(svg, img, [aria-hidden="true"]))) {
|
|
9423
|
+
color: var(--app-nav-ink);
|
|
9066
9424
|
}
|
|
9067
9425
|
|
|
9068
9426
|
.app-nav > a[aria-current="page"]::before {
|
|
@@ -9912,11 +10270,13 @@ a.avatar[aria-disabled="true"] {
|
|
|
9912
10270
|
* --segmented-radius
|
|
9913
10271
|
* --segmented-fg
|
|
9914
10272
|
* --segmented-selected-bg
|
|
10273
|
+
* --segmented-selected-fg
|
|
9915
10274
|
* --segmented-selected-border (fallback-only: no edge by default; a theme sets
|
|
9916
10275
|
* it once on its root, e.g. a flat theme whose selected pill has no shadow)
|
|
9917
10276
|
*
|
|
9918
10277
|
* Internal:
|
|
9919
10278
|
* --segment-min-size
|
|
10279
|
+
* --segment-focus
|
|
9920
10280
|
*/
|
|
9921
10281
|
.segmented {
|
|
9922
10282
|
--segmented-bg: var(--surface-subtle);
|
|
@@ -9937,6 +10297,8 @@ a.avatar[aria-disabled="true"] {
|
|
|
9937
10297
|
border: var(--border-width) solid transparent;
|
|
9938
10298
|
border-radius: var(--segmented-radius);
|
|
9939
10299
|
background: var(--segmented-bg);
|
|
10300
|
+
/* A rail, recessed with the fields when a theme sets --shadow-inset. */
|
|
10301
|
+
box-shadow: var(--shadow-inset, none);
|
|
9940
10302
|
font-size: var(--control-font-size);
|
|
9941
10303
|
vertical-align: middle;
|
|
9942
10304
|
}
|
|
@@ -10037,33 +10399,39 @@ a.avatar[aria-disabled="true"] {
|
|
|
10037
10399
|
The selected pill is set apart by its fill, its shadow and the full --text
|
|
10038
10400
|
ink against --text-muted; no edge by default. --segmented-selected-border
|
|
10039
10401
|
is read, never declared here, so a theme (a flat one without --shadow) can
|
|
10040
|
-
restore the edge once on its root.
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10402
|
+
restore the edge once on its root. The shadow is --shadow-control when a
|
|
10403
|
+
theme sets it, the surface --shadow otherwise.
|
|
10404
|
+
Trap: the ring and the shadow share one box-shadow list, and `none` is not
|
|
10405
|
+
a list item. A theme that sets either shadow to none drops the whole
|
|
10406
|
+
declaration, ring included; flatten with 0 0 #0000 or
|
|
10407
|
+
--shadow-color: transparent instead. */
|
|
10044
10408
|
.segment:is([aria-selected="true"], [aria-current="page"], [aria-current="true"]) {
|
|
10409
|
+
--segment-focus: var(--segmented-selected-fg, var(--focus));
|
|
10410
|
+
|
|
10045
10411
|
background: var(--segmented-selected-bg);
|
|
10046
|
-
color: var(--text);
|
|
10412
|
+
color: var(--segmented-selected-fg, var(--text));
|
|
10047
10413
|
box-shadow:
|
|
10048
10414
|
0 0 0 var(--border-width) var(--segmented-selected-border, transparent),
|
|
10049
|
-
var(--shadow);
|
|
10415
|
+
var(--shadow-control, var(--shadow));
|
|
10050
10416
|
}
|
|
10051
10417
|
|
|
10052
10418
|
.segment:has(> input:checked) {
|
|
10419
|
+
--segment-focus: var(--segmented-selected-fg, var(--focus));
|
|
10420
|
+
|
|
10053
10421
|
background: var(--segmented-selected-bg);
|
|
10054
|
-
color: var(--text);
|
|
10422
|
+
color: var(--segmented-selected-fg, var(--text));
|
|
10055
10423
|
box-shadow:
|
|
10056
10424
|
0 0 0 var(--border-width) var(--segmented-selected-border, transparent),
|
|
10057
|
-
var(--shadow);
|
|
10425
|
+
var(--shadow-control, var(--shadow));
|
|
10058
10426
|
}
|
|
10059
10427
|
|
|
10060
10428
|
.segment:focus-visible {
|
|
10061
|
-
outline: var(--focus-ring-width) solid var(--focus);
|
|
10429
|
+
outline: var(--focus-ring-width) solid var(--segment-focus, var(--focus));
|
|
10062
10430
|
outline-offset: calc(var(--focus-ring-width) * -1);
|
|
10063
10431
|
}
|
|
10064
10432
|
|
|
10065
10433
|
.segment:has(> input:focus-visible) {
|
|
10066
|
-
outline: var(--focus-ring-width) solid var(--focus);
|
|
10434
|
+
outline: var(--focus-ring-width) solid var(--segment-focus, var(--focus));
|
|
10067
10435
|
outline-offset: calc(var(--focus-ring-width) * -1);
|
|
10068
10436
|
}
|
|
10069
10437
|
|
|
@@ -10085,7 +10453,7 @@ a.avatar[aria-disabled="true"] {
|
|
|
10085
10453
|
is dropped here and the focus line takes the highlight's text color. */
|
|
10086
10454
|
@media (forced-colors: active) {
|
|
10087
10455
|
.segment:is([aria-selected="true"], [aria-current="page"], [aria-current="true"]) {
|
|
10088
|
-
--focus: HighlightText;
|
|
10456
|
+
--segment-focus: HighlightText;
|
|
10089
10457
|
|
|
10090
10458
|
forced-color-adjust: none;
|
|
10091
10459
|
background: Highlight;
|
|
@@ -10094,7 +10462,7 @@ a.avatar[aria-disabled="true"] {
|
|
|
10094
10462
|
}
|
|
10095
10463
|
|
|
10096
10464
|
.segment:has(> input:checked) {
|
|
10097
|
-
--focus: HighlightText;
|
|
10465
|
+
--segment-focus: HighlightText;
|
|
10098
10466
|
|
|
10099
10467
|
forced-color-adjust: none;
|
|
10100
10468
|
background: Highlight;
|
|
@@ -10206,6 +10574,7 @@ a.avatar[aria-disabled="true"] {
|
|
|
10206
10574
|
* --list-item-pad-block
|
|
10207
10575
|
* --list-item-pad-inline
|
|
10208
10576
|
* --list-item-gap
|
|
10577
|
+
* --list-current-inset-block
|
|
10209
10578
|
* --list-divider
|
|
10210
10579
|
* --list-radius
|
|
10211
10580
|
*/
|
|
@@ -10248,18 +10617,6 @@ a.avatar[aria-disabled="true"] {
|
|
|
10248
10617
|
background: var(--surface-raised);
|
|
10249
10618
|
}
|
|
10250
10619
|
|
|
10251
|
-
/* A row's fill sits inside the shell's border box, so its inner radius is the
|
|
10252
|
-
shell radius minus that border — and never negative on a square theme. */
|
|
10253
|
-
.list.grouped > :where(li:first-child > .list-item, .list-item:first-child) {
|
|
10254
|
-
border-start-start-radius: max(0px, calc(var(--list-radius) - var(--border-width)));
|
|
10255
|
-
border-start-end-radius: max(0px, calc(var(--list-radius) - var(--border-width)));
|
|
10256
|
-
}
|
|
10257
|
-
|
|
10258
|
-
.list.grouped > :where(li:last-child > .list-item, .list-item:last-child) {
|
|
10259
|
-
border-end-start-radius: max(0px, calc(var(--list-radius) - var(--border-width)));
|
|
10260
|
-
border-end-end-radius: max(0px, calc(var(--list-radius) - var(--border-width)));
|
|
10261
|
-
}
|
|
10262
|
-
|
|
10263
10620
|
/*
|
|
10264
10621
|
* Flex, not a three-track grid: the leading and trailing regions are optional,
|
|
10265
10622
|
* and a fixed `auto minmax(0, 1fr) auto` template gives an absent region a
|
|
@@ -10289,6 +10646,20 @@ a.avatar[aria-disabled="true"] {
|
|
|
10289
10646
|
border-block-start: var(--list-divider);
|
|
10290
10647
|
}
|
|
10291
10648
|
|
|
10649
|
+
/* A row's fill sits inside the shell's border box, so its inner radius is the
|
|
10650
|
+
shell radius minus that border — and never negative on a square theme. */
|
|
10651
|
+
.list.grouped > :where(li:first-child) > :where(.list-item),
|
|
10652
|
+
.list.grouped > :where(.list-item:first-child) {
|
|
10653
|
+
border-start-start-radius: max(0px, calc(var(--list-radius) - var(--border-width)));
|
|
10654
|
+
border-start-end-radius: max(0px, calc(var(--list-radius) - var(--border-width)));
|
|
10655
|
+
}
|
|
10656
|
+
|
|
10657
|
+
.list.grouped > :where(li:last-child) > :where(.list-item),
|
|
10658
|
+
.list.grouped > :where(.list-item:last-child) {
|
|
10659
|
+
border-end-start-radius: max(0px, calc(var(--list-radius) - var(--border-width)));
|
|
10660
|
+
border-end-end-radius: max(0px, calc(var(--list-radius) - var(--border-width)));
|
|
10661
|
+
}
|
|
10662
|
+
|
|
10292
10663
|
a.list-item {
|
|
10293
10664
|
position: relative;
|
|
10294
10665
|
color: inherit;
|
|
@@ -10315,9 +10686,21 @@ a.list-item:is([aria-current="page"], [aria-current="true"]) {
|
|
|
10315
10686
|
a.list-item:is([aria-current="page"], [aria-current="true"])::before {
|
|
10316
10687
|
content: "";
|
|
10317
10688
|
position: absolute;
|
|
10318
|
-
inset-block: var(--list-item-pad-block);
|
|
10689
|
+
inset-block: var(--list-current-inset-block, var(--list-item-pad-block));
|
|
10319
10690
|
inset-inline-start: 0;
|
|
10320
10691
|
border-inline-start: 2px solid var(--state-selected);
|
|
10692
|
+
pointer-events: none;
|
|
10693
|
+
}
|
|
10694
|
+
|
|
10695
|
+
/* Draw against the full corner, then trim the mark. Clipping the row itself
|
|
10696
|
+
would also clip its focus outline and any flyout anchored inside it. */
|
|
10697
|
+
:is(.list.grouped > li > .list-item, .list.grouped > .list-item):is(
|
|
10698
|
+
[aria-current="page"],
|
|
10699
|
+
[aria-current="true"]
|
|
10700
|
+
)::before {
|
|
10701
|
+
inset: 0;
|
|
10702
|
+
border-radius: inherit;
|
|
10703
|
+
clip-path: inset(var(--list-current-inset-block, var(--list-item-pad-block)) 0);
|
|
10321
10704
|
}
|
|
10322
10705
|
|
|
10323
10706
|
/* The content region is the one that flexes, whichever position it holds.
|
|
@@ -10381,7 +10764,8 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
|
|
|
10381
10764
|
*
|
|
10382
10765
|
* Public hooks:
|
|
10383
10766
|
* --table-min
|
|
10384
|
-
* --table-cell-pad
|
|
10767
|
+
* --table-cell-pad (a single length: the edge columns compare it to the radius)
|
|
10768
|
+
* --table-radius (on .table-wrap; the edge columns pad at least this much)
|
|
10385
10769
|
*
|
|
10386
10770
|
* Theme hooks (unset by default, read with a fallback, so a theme sets them
|
|
10387
10771
|
* once on its root and third-party grid bridges can read the same choice):
|
|
@@ -10401,8 +10785,10 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
|
|
|
10401
10785
|
max-inline-size: 100%;
|
|
10402
10786
|
min-inline-size: 0;
|
|
10403
10787
|
overflow-x: auto;
|
|
10788
|
+
--table-radius: var(--radius-lg);
|
|
10789
|
+
|
|
10404
10790
|
border: var(--border-width) solid var(--border);
|
|
10405
|
-
border-radius: var(--radius
|
|
10791
|
+
border-radius: var(--table-radius);
|
|
10406
10792
|
background: var(--surface-raised);
|
|
10407
10793
|
}
|
|
10408
10794
|
|
|
@@ -10431,6 +10817,22 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
|
|
|
10431
10817
|
vertical-align: baseline;
|
|
10432
10818
|
}
|
|
10433
10819
|
|
|
10820
|
+
/* The edge columns clear the wrap's corner: with an inline padding under the
|
|
10821
|
+
radius, the first letter of a header or caption sits inside the curve. The
|
|
10822
|
+
whole column takes it so the body stays aligned with its header. A row under
|
|
10823
|
+
a rowspan cell starts in the second column and takes it too. */
|
|
10824
|
+
.table caption {
|
|
10825
|
+
padding-inline: max(var(--table-cell-pad), var(--table-radius, 0px));
|
|
10826
|
+
}
|
|
10827
|
+
|
|
10828
|
+
.table :is(th, td):first-child {
|
|
10829
|
+
padding-inline-start: max(var(--table-cell-pad), var(--table-radius, 0px));
|
|
10830
|
+
}
|
|
10831
|
+
|
|
10832
|
+
.table :is(th, td):last-child {
|
|
10833
|
+
padding-inline-end: max(var(--table-cell-pad), var(--table-radius, 0px));
|
|
10834
|
+
}
|
|
10835
|
+
|
|
10434
10836
|
.table th {
|
|
10435
10837
|
color: var(--text-muted);
|
|
10436
10838
|
font-weight: var(--font-weight-semibold);
|
|
@@ -10476,6 +10878,7 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
|
|
|
10476
10878
|
* --meter-track
|
|
10477
10879
|
* --meter-value
|
|
10478
10880
|
* --bar-height
|
|
10881
|
+
* --bar-radius
|
|
10479
10882
|
*/
|
|
10480
10883
|
|
|
10481
10884
|
.meter {
|
|
@@ -10488,8 +10891,10 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
|
|
|
10488
10891
|
block-size: var(--bar-height);
|
|
10489
10892
|
overflow: hidden;
|
|
10490
10893
|
border: 0;
|
|
10491
|
-
border-radius: var(--radius
|
|
10894
|
+
border-radius: var(--bar-radius);
|
|
10492
10895
|
background: var(--meter-track);
|
|
10896
|
+
/* A rail, recessed with the fields when a theme sets --shadow-inset. */
|
|
10897
|
+
box-shadow: var(--shadow-inset, none);
|
|
10493
10898
|
}
|
|
10494
10899
|
|
|
10495
10900
|
/* A non-native meter is a weighted flex container. The element type keeps the
|
|
@@ -10515,31 +10920,33 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
|
|
|
10515
10920
|
-webkit-appearance: none;
|
|
10516
10921
|
block-size: var(--bar-height);
|
|
10517
10922
|
border: 0;
|
|
10518
|
-
border-radius: var(--radius
|
|
10923
|
+
border-radius: var(--bar-radius);
|
|
10519
10924
|
background: var(--meter-track);
|
|
10925
|
+
/* Paints over the host's inset shadow, so it carries it too. */
|
|
10926
|
+
box-shadow: var(--shadow-inset, none);
|
|
10520
10927
|
}
|
|
10521
10928
|
|
|
10522
10929
|
.meter::-webkit-meter-optimum-value {
|
|
10523
10930
|
block-size: var(--bar-height);
|
|
10524
|
-
border-radius: var(--radius
|
|
10931
|
+
border-radius: var(--bar-radius);
|
|
10525
10932
|
background: var(--success);
|
|
10526
10933
|
}
|
|
10527
10934
|
|
|
10528
10935
|
.meter::-webkit-meter-suboptimum-value {
|
|
10529
10936
|
block-size: var(--bar-height);
|
|
10530
|
-
border-radius: var(--radius
|
|
10937
|
+
border-radius: var(--bar-radius);
|
|
10531
10938
|
background: var(--warning);
|
|
10532
10939
|
}
|
|
10533
10940
|
|
|
10534
10941
|
.meter::-webkit-meter-even-less-good-value {
|
|
10535
10942
|
block-size: var(--bar-height);
|
|
10536
|
-
border-radius: var(--radius
|
|
10943
|
+
border-radius: var(--bar-radius);
|
|
10537
10944
|
background: var(--danger);
|
|
10538
10945
|
}
|
|
10539
10946
|
|
|
10540
10947
|
.meter::-moz-meter-bar {
|
|
10541
10948
|
block-size: var(--bar-height);
|
|
10542
|
-
border-radius: var(--radius
|
|
10949
|
+
border-radius: var(--bar-radius);
|
|
10543
10950
|
}
|
|
10544
10951
|
|
|
10545
10952
|
/* The background shorthand clears Gecko's native gradient. Keep state
|