actual-css 0.16.0 → 0.17.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 +78 -0
- package/README.md +8 -4
- package/components.json +21 -5
- package/dist/actual.full.css +410 -75
- package/dist/actual.full.js +2 -1
- package/dist/actual.full.min.css +1 -1
- package/docs/design-notes/app-ui.md +37 -3
- package/docs/design-notes/enhancement-contract.md +3 -1
- package/docs/design-notes/tokens.md +2 -0
- package/docs/navigation.json +14 -1
- package/docs/pages/components/accordion.md +5 -0
- package/docs/pages/components/alert.md +45 -17
- package/docs/pages/components/button.md +3 -0
- package/docs/pages/components/chat.md +20 -0
- package/docs/pages/components/dialog.md +36 -0
- package/docs/pages/components/drawer.md +52 -8
- package/docs/pages/components/navbar.md +26 -2
- package/docs/pages/components/rating.md +111 -12
- package/docs/pages/components/segmented.md +36 -1
- package/docs/pages/components/spinner.md +2 -0
- package/docs/pages/components/table.md +77 -0
- package/docs/pages/components/timeline.md +3 -1
- package/docs/pages/enhancements/flyout.md +83 -14
- package/docs/pages/enhancements/status-bar.md +1 -0
- package/docs/pages/enhancements/tabs.md +5 -0
- package/docs/pages/examples/overview.md +7 -1
- package/docs/pages/forms/ajax.md +101 -0
- package/docs/pages/forms/color-swatches.md +31 -2
- package/docs/pages/forms/date-picker.md +6 -0
- package/docs/pages/forms/joined-controls.md +8 -3
- package/docs/pages/forms/overview.md +2 -2
- package/docs/pages/forms/sticky-actions.md +2 -0
- package/docs/pages/forms/unsaved-changes.md +198 -0
- package/docs/pages/foundations/philosophy.md +2 -1
- package/docs/pages/foundations/theming.md +21 -4
- package/docs/pages/foundations/tokens.md +1 -1
- package/docs/pages/guides/introduction.md +1 -1
- package/docs/pages/guides/progressive-enhancement.md +30 -49
- package/docs/pages/guides/upgrading.md +16 -3
- package/docs/pages/layout/choosing.md +5 -0
- package/docs/pages/layout/column-layout.md +22 -8
- package/docs/pages/layout/scroll-snap.md +69 -2
- package/docs/pages/layout/sidebar-shell.md +68 -0
- package/docs/pages/patterns/empty-state.md +74 -0
- package/docs/pages/patterns/hierarchical-nav.md +40 -19
- package/docs/pages/patterns/navigation-list.md +3 -60
- package/docs/pages/patterns/stat.md +61 -0
- package/docs/pages/utilities/accessibility.md +32 -10
- package/package.json +4 -1
- package/reserved-classes.json +2 -0
- package/src/css/components/busy.css +25 -0
- package/src/css/components/button.css +3 -0
- package/src/css/components/chat.css +5 -1
- package/src/css/components/drawer.css +37 -3
- package/src/css/components/flyout.css +37 -0
- package/src/css/components/modal.css +3 -0
- package/src/css/components/navbar.css +99 -38
- package/src/css/components/rating.css +50 -5
- package/src/css/components/segmented.css +25 -2
- package/src/css/components/status-bar.css +4 -2
- package/src/css/forms/choice-card.css +5 -2
- package/src/css/forms/color-swatch.css +38 -19
- package/src/css/forms/custom-select.css +5 -0
- package/src/css/forms/form.css +3 -1
- package/src/css/layout/index.css +2 -0
- package/src/css/layout/sidebar-shell.css +67 -0
- package/src/js/ajax.js +148 -0
- package/src/js/dialog.js +59 -2
- package/src/js/dirty.js +140 -0
- package/src/js/dismiss.js +25 -0
- package/src/js/events.js +17 -0
- package/src/js/focus.js +12 -0
- package/src/js/form-submission.js +34 -0
- package/src/js/full.js +2 -0
- package/src/js/selectors.js +10 -2
- package/src/js/status.js +71 -10
- package/src/js/tab.js +16 -2
- package/src/js/validation.js +12 -4
- package/src/tooling/theme-contrast.js +3 -2
package/dist/actual.full.css
CHANGED
|
@@ -1328,6 +1328,7 @@ small {
|
|
|
1328
1328
|
* .center centered content column
|
|
1329
1329
|
* .frame fixed-ratio media frame
|
|
1330
1330
|
* .app-shell full-height application shell
|
|
1331
|
+
* .sidebar-shell persistent side region + main, each scrolling; drawer below 64rem
|
|
1331
1332
|
* .app-layout topbar + scrolling main + bottom/side app navigation
|
|
1332
1333
|
* .media fixed media + flexible content
|
|
1333
1334
|
* .switcher peer regions: all horizontal or all stacked
|
|
@@ -1510,6 +1511,74 @@ small {
|
|
|
1510
1511
|
flex-direction: column;
|
|
1511
1512
|
}
|
|
1512
1513
|
|
|
1514
|
+
/*
|
|
1515
|
+
* Sidebar shell — a persistent side region beside the main one on a wide
|
|
1516
|
+
* viewport, each scrolling on its own; below 64rem the side region hides and
|
|
1517
|
+
* the document scrolls. The page mirrors the navigation into a dialog.drawer.
|
|
1518
|
+
*
|
|
1519
|
+
* Docs: docs/pages/layout/sidebar-shell.md
|
|
1520
|
+
* Design note: docs/design-notes/app-ui.md#sidebar-shell
|
|
1521
|
+
*
|
|
1522
|
+
* Structure: two direct children, an `aside` (side) and one other element
|
|
1523
|
+
* (main). The breakpoint is a literal; a custom property cannot sit in a
|
|
1524
|
+
* media condition.
|
|
1525
|
+
*
|
|
1526
|
+
* Public hooks:
|
|
1527
|
+
* --sidebar-shell-size
|
|
1528
|
+
*/
|
|
1529
|
+
.sidebar-shell {
|
|
1530
|
+
--sidebar-shell-size: 16rem;
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
/* Hidden below, never shown above: the aside keeps the author's display (an
|
|
1534
|
+
aside.stack). Where range syntax is unsupported the rule drops and the
|
|
1535
|
+
sidebar stacks above the content, still reachable. Screen only: a printed
|
|
1536
|
+
page is narrower than 64rem, and print never hides framework content. */
|
|
1537
|
+
@media screen and (width < 64rem) {
|
|
1538
|
+
.sidebar-shell > aside {
|
|
1539
|
+
display: none;
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
@media (width >= 64rem) {
|
|
1544
|
+
.sidebar-shell {
|
|
1545
|
+
display: grid;
|
|
1546
|
+
grid-template-columns: var(--sidebar-shell-size) minmax(0, 1fr);
|
|
1547
|
+
block-size: var(--viewport-block);
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
/* Each region is its own scroller, so the sidebar stays put. min-block-size
|
|
1551
|
+
lets the grid row hold them to the viewport instead of their content. */
|
|
1552
|
+
.sidebar-shell > * {
|
|
1553
|
+
min-block-size: 0;
|
|
1554
|
+
overflow: auto;
|
|
1555
|
+
overscroll-behavior: contain;
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
.sidebar-shell > aside {
|
|
1559
|
+
grid-column: 1;
|
|
1560
|
+
grid-row: 1;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
.sidebar-shell > :not(aside) {
|
|
1564
|
+
grid-column: 2;
|
|
1565
|
+
grid-row: 1;
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
/* Paper is one flow, side then main, nothing clipped by a scroller. Leaving
|
|
1570
|
+
the sidebar off the page is the application's print stylesheet. */
|
|
1571
|
+
@media print {
|
|
1572
|
+
.sidebar-shell {
|
|
1573
|
+
display: block;
|
|
1574
|
+
block-size: auto;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
.sidebar-shell > * {
|
|
1578
|
+
overflow: visible;
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1513
1582
|
/*
|
|
1514
1583
|
* Specialized application shell recipe: one exact DOM structure uses a
|
|
1515
1584
|
* bottom navigation bar when narrow and a labelled side navigation when space
|
|
@@ -2216,7 +2285,8 @@ small {
|
|
|
2216
2285
|
|
|
2217
2286
|
/* Flush — the frame removed, for a group that already sits in a card or a
|
|
2218
2287
|
form section. With no border to notch, the legend is a plain label above
|
|
2219
|
-
the options: no gutter,
|
|
2288
|
+
the options: no gutter, the .field label-to-control gap below it, and the
|
|
2289
|
+
.field label size — the small size only suits a legend set in a frame. */
|
|
2220
2290
|
.field-group.flush {
|
|
2221
2291
|
padding: 0;
|
|
2222
2292
|
border: 0;
|
|
@@ -2226,6 +2296,7 @@ small {
|
|
|
2226
2296
|
.field-group.flush > legend {
|
|
2227
2297
|
margin-block-end: var(--space-10);
|
|
2228
2298
|
padding-inline: 0;
|
|
2299
|
+
font-size: var(--control-font-size);
|
|
2229
2300
|
}
|
|
2230
2301
|
|
|
2231
2302
|
.field-help {
|
|
@@ -3478,8 +3549,11 @@ small {
|
|
|
3478
3549
|
cursor: not-allowed;
|
|
3479
3550
|
}
|
|
3480
3551
|
|
|
3481
|
-
|
|
3482
|
-
|
|
3552
|
+
/* Touch can retain :hover after a tap; hover must never mask selection. */
|
|
3553
|
+
@media (hover: hover) {
|
|
3554
|
+
.choice-card:hover:not(:has(:disabled, :checked)) {
|
|
3555
|
+
--choice-card-border: var(--text-subtle);
|
|
3556
|
+
}
|
|
3483
3557
|
}
|
|
3484
3558
|
|
|
3485
3559
|
/* Checked border — shared by radio and checkbox */
|
|
@@ -3664,11 +3738,11 @@ small {
|
|
|
3664
3738
|
* rows sit one gap apart like columns. Edge, selection ring and focus ring all
|
|
3665
3739
|
* belong to the visible swatch.
|
|
3666
3740
|
*
|
|
3667
|
-
* The color is arbitrary, so nothing drawn on it
|
|
3668
|
-
*
|
|
3669
|
-
*
|
|
3670
|
-
*
|
|
3671
|
-
* system colors
|
|
3741
|
+
* The color is arbitrary, so nothing is drawn on it: the selected mark is a
|
|
3742
|
+
* --text ring outside the swatch (::after), past a transparent gap, so it reads
|
|
3743
|
+
* on any color and any background and leaves the color whole. A hairline edge
|
|
3744
|
+
* keeps a near-white color apart from the page. Both pseudo-elements opt out of
|
|
3745
|
+
* forced colors to keep the color, so they take system colors themselves there.
|
|
3672
3746
|
*
|
|
3673
3747
|
* Without :has() the native radio stays visible in the swatch and carries the
|
|
3674
3748
|
* state; the ring needs :has() to mirror it.
|
|
@@ -3676,16 +3750,18 @@ small {
|
|
|
3676
3750
|
* Public hooks:
|
|
3677
3751
|
* --color-swatch-value (fallback-only: the color, set per swatch)
|
|
3678
3752
|
* --color-swatch-size
|
|
3679
|
-
* --color-swatch-radius
|
|
3753
|
+
* --color-swatch-radius (fallback-only: set it on the palette or a swatch)
|
|
3680
3754
|
*/
|
|
3681
3755
|
.color-swatch {
|
|
3682
3756
|
/* The .switch track height (switch.css); a browser test holds them equal. */
|
|
3683
3757
|
--color-swatch-size: calc(var(--choice-control-size) + 0.125em);
|
|
3684
|
-
--color-swatch-radius: var(--radius-full);
|
|
3685
3758
|
/* Internal: what the hit area adds to the swatch, half on each side. One gap
|
|
3686
3759
|
at most, so two neighbours never claim the same point — a wider reach let
|
|
3687
3760
|
the next swatch take a click on this one's center. */
|
|
3688
3761
|
--color-swatch-reach: clamp(0px, var(--control-size) - var(--color-swatch-size), var(--gap));
|
|
3762
|
+
/* Internal: how far the selection ring (gap + stroke) reaches past the
|
|
3763
|
+
swatch. The focus ring moves out by as much on a checked swatch. */
|
|
3764
|
+
--color-swatch-ring: 4px;
|
|
3689
3765
|
|
|
3690
3766
|
position: relative;
|
|
3691
3767
|
display: inline-grid;
|
|
@@ -3717,13 +3793,29 @@ small {
|
|
|
3717
3793
|
block-size: var(--color-swatch-size);
|
|
3718
3794
|
box-sizing: border-box;
|
|
3719
3795
|
border: var(--border-width) solid var(--border-control);
|
|
3720
|
-
border-radius: var(--color-swatch-radius);
|
|
3796
|
+
border-radius: var(--color-swatch-radius, var(--radius-full));
|
|
3721
3797
|
background: var(--color-swatch-value, transparent) padding-box;
|
|
3722
3798
|
/* The color is the content, as on .color (native.css). */
|
|
3723
3799
|
forced-color-adjust: none;
|
|
3724
|
-
transition:
|
|
3725
|
-
|
|
3726
|
-
|
|
3800
|
+
transition: border-color var(--duration);
|
|
3801
|
+
}
|
|
3802
|
+
|
|
3803
|
+
/* Selection ring, drawn on every swatch and colored when checked. Its negative
|
|
3804
|
+
margin lays it out at the swatch size: a ring wider than the grid track
|
|
3805
|
+
would widen it and push the swatch off-center in a tight palette. */
|
|
3806
|
+
.color-swatch::after {
|
|
3807
|
+
content: "";
|
|
3808
|
+
grid-area: 1 / 1;
|
|
3809
|
+
inline-size: calc(var(--color-swatch-size) + 2 * var(--color-swatch-ring));
|
|
3810
|
+
block-size: calc(var(--color-swatch-size) + 2 * var(--color-swatch-ring));
|
|
3811
|
+
margin: calc(-1 * var(--color-swatch-ring));
|
|
3812
|
+
box-sizing: border-box;
|
|
3813
|
+
border: calc(var(--color-swatch-ring) / 2) solid transparent;
|
|
3814
|
+
border-radius: calc(var(--color-swatch-radius, var(--radius-full)) + var(--color-swatch-ring));
|
|
3815
|
+
pointer-events: none;
|
|
3816
|
+
/* The gap stays transparent; forced colors would paint it. */
|
|
3817
|
+
forced-color-adjust: none;
|
|
3818
|
+
transition: border-color var(--duration);
|
|
3727
3819
|
}
|
|
3728
3820
|
|
|
3729
3821
|
/* Shares the swatch's cell and paints after ::before, so a native radio left
|
|
@@ -3755,10 +3847,8 @@ small {
|
|
|
3755
3847
|
border-color: var(--text-subtle);
|
|
3756
3848
|
}
|
|
3757
3849
|
|
|
3758
|
-
.color-swatch:has(> input:checked)::
|
|
3759
|
-
|
|
3760
|
-
inset 0 0 0 2px var(--text),
|
|
3761
|
-
inset 0 0 0 4px var(--surface-opaque);
|
|
3850
|
+
.color-swatch:has(> input:checked)::after {
|
|
3851
|
+
border-color: var(--text);
|
|
3762
3852
|
}
|
|
3763
3853
|
|
|
3764
3854
|
/* The ring goes around the visible swatch, not the larger hit area. */
|
|
@@ -3776,6 +3866,11 @@ small {
|
|
|
3776
3866
|
outline-offset: var(--focus-outline-offset);
|
|
3777
3867
|
}
|
|
3778
3868
|
|
|
3869
|
+
/* Outside the selection ring, so the two never share a stroke. */
|
|
3870
|
+
.color-swatch:has(> input:checked:focus-visible)::before {
|
|
3871
|
+
outline-offset: calc(var(--focus-outline-offset) + var(--color-swatch-ring));
|
|
3872
|
+
}
|
|
3873
|
+
|
|
3779
3874
|
.color-swatch:disabled {
|
|
3780
3875
|
opacity: var(--disabled-opacity);
|
|
3781
3876
|
cursor: not-allowed;
|
|
@@ -3795,10 +3890,8 @@ small {
|
|
|
3795
3890
|
border-color: CanvasText;
|
|
3796
3891
|
}
|
|
3797
3892
|
|
|
3798
|
-
.color-swatch:has(> input:checked)::
|
|
3799
|
-
|
|
3800
|
-
inset 0 0 0 2px CanvasText,
|
|
3801
|
-
inset 0 0 0 4px Canvas;
|
|
3893
|
+
.color-swatch:has(> input:checked)::after {
|
|
3894
|
+
border-color: CanvasText;
|
|
3802
3895
|
}
|
|
3803
3896
|
|
|
3804
3897
|
.color-swatch:disabled::before {
|
|
@@ -3832,6 +3925,11 @@ small {
|
|
|
3832
3925
|
.select:not([multiple], .native, [size]:not([size="1"])) {
|
|
3833
3926
|
appearance: base-select;
|
|
3834
3927
|
align-items: center;
|
|
3928
|
+
/* why: base-select brings a UA padding-block (0.25em) that the native
|
|
3929
|
+
select lacks; with a 24px line it pushed a .compact select to 34px
|
|
3930
|
+
against --control-size 32px. min-block-size and align-items already
|
|
3931
|
+
center the value. */
|
|
3932
|
+
padding-block: 0;
|
|
3835
3933
|
|
|
3836
3934
|
&::picker(select) {
|
|
3837
3935
|
appearance: base-select;
|
|
@@ -4277,6 +4375,9 @@ small {
|
|
|
4277
4375
|
}
|
|
4278
4376
|
|
|
4279
4377
|
.btn.icon-only {
|
|
4378
|
+
/* why: beside a full-width control (.join, a flex row) it would share the
|
|
4379
|
+
shrink and stop being square. */
|
|
4380
|
+
flex: none;
|
|
4280
4381
|
inline-size: var(--btn-min-size);
|
|
4281
4382
|
block-size: var(--btn-min-size);
|
|
4282
4383
|
padding: 0;
|
|
@@ -5345,6 +5446,9 @@ a.badge[aria-disabled="true"] {
|
|
|
5345
5446
|
/* Keep the surface anchored to the viewport in the top layer. This also
|
|
5346
5447
|
provides the containing block for the absolutely positioned close button. */
|
|
5347
5448
|
position: fixed;
|
|
5449
|
+
/* Restates the UA centering: a modal authored inside .stack or .cluster
|
|
5450
|
+
would otherwise take their child margin reset and pin to the top. */
|
|
5451
|
+
margin: auto;
|
|
5348
5452
|
|
|
5349
5453
|
/* The root is :where(dialog).modal (0-1-0), so a single author class can
|
|
5350
5454
|
outrank these defaults — no fallback-only indirection needed here. */
|
|
@@ -5696,14 +5800,17 @@ html.has-modal-open.had-scrollbar {
|
|
|
5696
5800
|
* navigation content inside uses .nav-link and .accordion, which carry their
|
|
5697
5801
|
* own link/summary styling.
|
|
5698
5802
|
*
|
|
5803
|
+
* Sides: start (default), end, and bottom (a bottom sheet) via data-side.
|
|
5804
|
+
*
|
|
5699
5805
|
* Public hooks:
|
|
5700
|
-
* --drawer-size
|
|
5806
|
+
* --drawer-size (width on start/end, maximum height on bottom)
|
|
5701
5807
|
* --drawer-pad
|
|
5702
5808
|
*
|
|
5703
5809
|
* The corner close control is .close (components/close.css).
|
|
5704
5810
|
*
|
|
5705
5811
|
* Internal:
|
|
5706
5812
|
* --drawer-closed-translate (side/RTL positioning state)
|
|
5813
|
+
* --drawer-closed-transform (closed position; bottom changes its axis)
|
|
5707
5814
|
* --drawer-focus-bleed
|
|
5708
5815
|
* --drawer-close-reserve (header room for a corner close; zero without a close)
|
|
5709
5816
|
* --drawer-motion-duration (shared by panel and ::backdrop so exit duration
|
|
@@ -5716,6 +5823,9 @@ html.has-modal-open.had-scrollbar {
|
|
|
5716
5823
|
/* The inset a direct .bleed child cancels (components/bleed.css). */
|
|
5717
5824
|
--surface-pad: var(--drawer-pad);
|
|
5718
5825
|
--drawer-closed-translate: -100%;
|
|
5826
|
+
/* The closed position as one transform, so a side can change axis without
|
|
5827
|
+
a rule that would tie with [open] on specificity. */
|
|
5828
|
+
--drawer-closed-transform: translateX(var(--drawer-closed-translate));
|
|
5719
5829
|
/* Header room for a corner close. Unconditional baseline: without :has()
|
|
5720
5830
|
(Degraded tier) a header keeps too much room rather than a title running
|
|
5721
5831
|
under the close. Zeroed when the drawer has no close. */
|
|
@@ -5754,7 +5864,7 @@ html.has-modal-open.had-scrollbar {
|
|
|
5754
5864
|
color: var(--text);
|
|
5755
5865
|
box-shadow: var(--shadow);
|
|
5756
5866
|
opacity: 0;
|
|
5757
|
-
transform:
|
|
5867
|
+
transform: var(--drawer-closed-transform);
|
|
5758
5868
|
/* Unsupported discrete behavior drops alone, preserving opacity/transform. */
|
|
5759
5869
|
transition-property: opacity, transform, overlay, display;
|
|
5760
5870
|
transition-duration: var(--drawer-motion-duration);
|
|
@@ -5808,10 +5918,32 @@ html.has-modal-open.had-scrollbar {
|
|
|
5808
5918
|
opacity: 1;
|
|
5809
5919
|
}
|
|
5810
5920
|
|
|
5921
|
+
/* Bottom sheet: the same drawer on the block-end edge, sized by its content
|
|
5922
|
+
up to --drawer-size, which reads as a height here. :where() keeps the size
|
|
5923
|
+
at the base rule's weight, so an application class still overrides it. */
|
|
5924
|
+
:where(dialog).drawer:where([data-side="bottom"]) {
|
|
5925
|
+
--drawer-size: 32rem;
|
|
5926
|
+
--drawer-closed-transform: translateY(100%);
|
|
5927
|
+
}
|
|
5928
|
+
|
|
5929
|
+
:where(dialog).drawer[data-side="bottom"] {
|
|
5930
|
+
inset-block: auto 0;
|
|
5931
|
+
inset-inline: 0;
|
|
5932
|
+
inline-size: 100%;
|
|
5933
|
+
block-size: auto;
|
|
5934
|
+
max-block-size: min(calc(var(--viewport-block) * 0.85), var(--drawer-size));
|
|
5935
|
+
/* The home indicator sits over the panel's last line otherwise. */
|
|
5936
|
+
padding-block-end: calc(var(--drawer-pad) + env(safe-area-inset-bottom, 0px));
|
|
5937
|
+
border-inline-end: 0;
|
|
5938
|
+
border-block-start: var(--border-width) solid var(--border);
|
|
5939
|
+
border-start-start-radius: var(--radius-lg);
|
|
5940
|
+
border-start-end-radius: var(--radius-lg);
|
|
5941
|
+
}
|
|
5942
|
+
|
|
5811
5943
|
@starting-style {
|
|
5812
5944
|
:where(dialog).drawer[open] {
|
|
5813
5945
|
opacity: 0;
|
|
5814
|
-
transform:
|
|
5946
|
+
transform: var(--drawer-closed-transform);
|
|
5815
5947
|
}
|
|
5816
5948
|
|
|
5817
5949
|
:where(dialog).drawer[open]::backdrop {
|
|
@@ -5839,6 +5971,12 @@ html.has-modal-open.had-scrollbar {
|
|
|
5839
5971
|
under the header or footer. */
|
|
5840
5972
|
margin: calc(var(--drawer-focus-bleed) * -1);
|
|
5841
5973
|
padding: var(--drawer-focus-bleed);
|
|
5974
|
+
/* The scrollport reaches the panel's inline-end edge and takes the panel
|
|
5975
|
+
padding back inside: the scrollbar sits on the edge and the content keeps
|
|
5976
|
+
--drawer-pad on both sides. Inside the content box, the scrollbar sat a
|
|
5977
|
+
focus bleed from the text with the panel padding wasted beyond it. */
|
|
5978
|
+
margin-inline-end: calc(var(--drawer-pad) * -1);
|
|
5979
|
+
padding-inline-end: var(--drawer-pad);
|
|
5842
5980
|
overflow: auto;
|
|
5843
5981
|
overscroll-behavior: contain;
|
|
5844
5982
|
}
|
|
@@ -5992,6 +6130,9 @@ picture.bleed > img {
|
|
|
5992
6130
|
* Runtime marker (managed by surface.js): .is-open marks an open flyout.
|
|
5993
6131
|
* --surface-anchor-width is set by surface.js while an open flyout is positioned.
|
|
5994
6132
|
*
|
|
6133
|
+
* Modifier: .scrollable keeps a header and footer in view while the one body
|
|
6134
|
+
* region between them scrolls.
|
|
6135
|
+
*
|
|
5995
6136
|
* Public hooks:
|
|
5996
6137
|
* --flyout-inline-size
|
|
5997
6138
|
* --flyout-max-inline-size
|
|
@@ -5999,6 +6140,7 @@ picture.bleed > img {
|
|
|
5999
6140
|
*
|
|
6000
6141
|
* Internal:
|
|
6001
6142
|
* --menu-item-size (derived from --control-size for menu rows)
|
|
6143
|
+
* --flyout-focus-bleed (focus reserve of the .scrollable body)
|
|
6002
6144
|
* --available-height (measured by the positioner)
|
|
6003
6145
|
* --surface-anchor-width (measured by surface.js)
|
|
6004
6146
|
*/
|
|
@@ -6149,6 +6291,39 @@ picture.bleed > img {
|
|
|
6149
6291
|
margin: 0;
|
|
6150
6292
|
}
|
|
6151
6293
|
|
|
6294
|
+
/* .scrollable: the .modal.scrollable contract on a panel with a header, one
|
|
6295
|
+
body and a footer — the header and footer keep their size and the body
|
|
6296
|
+
absorbs the overflow, so an Apply row stays in view however long the list
|
|
6297
|
+
or however little room the positioner leaves. Opt-in, because a menu or a
|
|
6298
|
+
multi-section nav panel has no single body to scroll. :where() keeps the
|
|
6299
|
+
display at .flyout's weight, so [hidden] and the closed popover still win
|
|
6300
|
+
whatever the source order. */
|
|
6301
|
+
.flyout:where(.scrollable) {
|
|
6302
|
+
display: flex;
|
|
6303
|
+
flex-direction: column;
|
|
6304
|
+
overflow: hidden;
|
|
6305
|
+
}
|
|
6306
|
+
|
|
6307
|
+
.flyout.scrollable > :is(header, footer) {
|
|
6308
|
+
flex: none;
|
|
6309
|
+
}
|
|
6310
|
+
|
|
6311
|
+
.flyout.scrollable > :not(:is(header, footer)) {
|
|
6312
|
+
/* Declared here, not as a :root alias: an inherited alias arrives already
|
|
6313
|
+
computed, so a --focus-ring-width override on the panel would not reach
|
|
6314
|
+
it. */
|
|
6315
|
+
--flyout-focus-bleed: calc(var(--focus-outline-offset) + var(--focus-ring-width));
|
|
6316
|
+
|
|
6317
|
+
flex: 1 1 auto;
|
|
6318
|
+
min-block-size: 0;
|
|
6319
|
+
/* Keep focus paint inside the clip without moving the content: the reserve
|
|
6320
|
+
reaches into the panel gap and padding, both --space-10 by default. */
|
|
6321
|
+
margin: calc(var(--flyout-focus-bleed) * -1);
|
|
6322
|
+
padding: var(--flyout-focus-bleed);
|
|
6323
|
+
overflow: auto;
|
|
6324
|
+
overscroll-behavior: contain;
|
|
6325
|
+
}
|
|
6326
|
+
|
|
6152
6327
|
/* Vertical dividers — .menu-separator (menu.css) is the canonical way to
|
|
6153
6328
|
separate menu items. Flyout panels that are not menus use auto grid gap
|
|
6154
6329
|
declared on .flyout itself. */
|
|
@@ -6792,8 +6967,13 @@ picture.bleed > img {
|
|
|
6792
6967
|
* shows that spinner as a centered overlay over a faded surface. Buttons keep
|
|
6793
6968
|
* their spinners inline (e.g. .btn[aria-busy] > .spinner stays inline-flex).
|
|
6794
6969
|
*
|
|
6970
|
+
* The overlay fades in after --busy-delay, so a fast request leaves the
|
|
6971
|
+
* content untouched instead of flashing it. Reduced motion drops the delay
|
|
6972
|
+
* with every other animation (reset.css): the overlay then shows at once.
|
|
6973
|
+
*
|
|
6795
6974
|
* Public hooks:
|
|
6796
6975
|
* --busy-overlay-bg
|
|
6976
|
+
* --busy-delay
|
|
6797
6977
|
*
|
|
6798
6978
|
* Internal:
|
|
6799
6979
|
* --spinner-size (overlay copy of the shared spinner hook)
|
|
@@ -6828,6 +7008,26 @@ picture.bleed > img {
|
|
|
6828
7008
|
margin: auto;
|
|
6829
7009
|
display: block;
|
|
6830
7010
|
}
|
|
7011
|
+
|
|
7012
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
7013
|
+
[aria-busy="true"]:not(.btn):has(> .spinner:last-child)::before {
|
|
7014
|
+
animation: actual-busy-reveal var(--duration-slow) var(--busy-delay, 300ms) ease both;
|
|
7015
|
+
}
|
|
7016
|
+
|
|
7017
|
+
/* Restates the spin: one animation list replaces spinner.css's. */
|
|
7018
|
+
[aria-busy="true"]:not(.btn) > .spinner:last-child {
|
|
7019
|
+
animation:
|
|
7020
|
+
actual-busy-reveal var(--duration-slow) var(--busy-delay, 300ms) ease both,
|
|
7021
|
+
actual-spin var(--duration-spin) linear infinite;
|
|
7022
|
+
}
|
|
7023
|
+
}
|
|
7024
|
+
}
|
|
7025
|
+
|
|
7026
|
+
/* `both` holds the from-frame through the delay. */
|
|
7027
|
+
@keyframes actual-busy-reveal {
|
|
7028
|
+
from {
|
|
7029
|
+
opacity: 0;
|
|
7030
|
+
}
|
|
6831
7031
|
}
|
|
6832
7032
|
|
|
6833
7033
|
@supports (selector([aria-busy="true"]:has(> .spinner:last-child))) and
|
|
@@ -6977,7 +7177,8 @@ picture.bleed > img {
|
|
|
6977
7177
|
* Internal:
|
|
6978
7178
|
* --status-bg
|
|
6979
7179
|
* --status-fg
|
|
6980
|
-
* --status-viewport-offset (written by status.js while the bar is open
|
|
7180
|
+
* --status-viewport-offset (written by status.js while the bar is open: the
|
|
7181
|
+
* keyboard band plus any docked .form-actions.sticky bar)
|
|
6981
7182
|
*/
|
|
6982
7183
|
|
|
6983
7184
|
/* Intent boundary — inherited intents do not tint this component.
|
|
@@ -6993,7 +7194,8 @@ picture.bleed > img {
|
|
|
6993
7194
|
|
|
6994
7195
|
position: fixed;
|
|
6995
7196
|
/* Fixed positioning tracks the layout viewport, which the mobile software
|
|
6996
|
-
keyboard covers
|
|
7197
|
+
keyboard covers, and a docked .form-actions.sticky bar shares its bottom
|
|
7198
|
+
edge. status.js writes both occluded bands into the offset. */
|
|
6997
7199
|
inset-block-end: calc(var(--space-40) + var(--status-viewport-offset, 0px));
|
|
6998
7200
|
inset-inline: var(--space-40);
|
|
6999
7201
|
z-index: var(--z-status);
|
|
@@ -7384,6 +7586,7 @@ a.avatar[aria-disabled="true"] {
|
|
|
7384
7586
|
* Public hooks:
|
|
7385
7587
|
* --chat-gap
|
|
7386
7588
|
* --chat-max-size
|
|
7589
|
+
* --chat-avatar-align
|
|
7387
7590
|
*
|
|
7388
7591
|
* Internal:
|
|
7389
7592
|
* --chat-bubble-bg
|
|
@@ -7393,6 +7596,9 @@ a.avatar[aria-disabled="true"] {
|
|
|
7393
7596
|
.chat {
|
|
7394
7597
|
--chat-gap: var(--space-30);
|
|
7395
7598
|
--chat-max-size: min(85%, 40rem);
|
|
7599
|
+
/* end: the avatar sits beside the last line, as in messaging. start sets it
|
|
7600
|
+
beside the header, for long answers or comment threads with a footer. */
|
|
7601
|
+
--chat-avatar-align: end;
|
|
7396
7602
|
|
|
7397
7603
|
display: grid;
|
|
7398
7604
|
grid-auto-rows: min-content;
|
|
@@ -7411,7 +7617,7 @@ a.avatar[aria-disabled="true"] {
|
|
|
7411
7617
|
|
|
7412
7618
|
.chat-avatar {
|
|
7413
7619
|
grid-row: 1 / span 3;
|
|
7414
|
-
align-self:
|
|
7620
|
+
align-self: var(--chat-avatar-align);
|
|
7415
7621
|
}
|
|
7416
7622
|
|
|
7417
7623
|
.chat-start > .chat-avatar {
|
|
@@ -7638,10 +7844,12 @@ a.avatar[aria-disabled="true"] {
|
|
|
7638
7844
|
* --rating-color
|
|
7639
7845
|
* --rating-empty
|
|
7640
7846
|
* --rating-star
|
|
7847
|
+
* --rating-star-empty (the empty star's shape; the filled one by default)
|
|
7641
7848
|
* --rating-value (display: the shown value, fractions allowed)
|
|
7642
7849
|
* --rating-max (display: the number of stars)
|
|
7643
7850
|
*
|
|
7644
7851
|
* Internal:
|
|
7852
|
+
* --rating-shape
|
|
7645
7853
|
* --rating-fill
|
|
7646
7854
|
* --rating-direction
|
|
7647
7855
|
*/
|
|
@@ -7651,10 +7859,12 @@ a.avatar[aria-disabled="true"] {
|
|
|
7651
7859
|
|
|
7652
7860
|
.rating {
|
|
7653
7861
|
--rating-size: 1.25rem;
|
|
7654
|
-
--rating-gap:
|
|
7862
|
+
--rating-gap: var(--space-10);
|
|
7655
7863
|
--rating-color: var(--intent, var(--warning));
|
|
7656
7864
|
--rating-empty: var(--border);
|
|
7657
7865
|
--rating-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='2 2 16 16'%3E%3Cpath d='M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 0 0 .95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 0 0-.364 1.118l1.07 3.292c.3.922-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 0 0-1.175 0l-2.8 2.034c-.783.57-1.838-.196-1.539-1.118l1.07-3.292a1 1 0 0 0-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 0 0 .951-.69l1.07-3.292Z'/%3E%3C/svg%3E");
|
|
7866
|
+
/* An outline here turns the empty stars into a shape cue (see the docs). */
|
|
7867
|
+
--rating-star-empty: var(--rating-star);
|
|
7658
7868
|
|
|
7659
7869
|
display: inline-flex;
|
|
7660
7870
|
gap: 0;
|
|
@@ -7665,19 +7875,29 @@ a.avatar[aria-disabled="true"] {
|
|
|
7665
7875
|
appearance: none;
|
|
7666
7876
|
flex: 0 0 auto;
|
|
7667
7877
|
inline-size: calc(var(--rating-size) + var(--rating-gap));
|
|
7668
|
-
|
|
7878
|
+
/* Taller than the star: the hit area grows, the drawing does not. */
|
|
7879
|
+
block-size: calc(var(--rating-size) + var(--space-20));
|
|
7669
7880
|
margin: 0;
|
|
7670
7881
|
border: 0;
|
|
7671
7882
|
background: var(--rating-empty);
|
|
7672
7883
|
/* Contiguous radio boxes own hit-testing; the centered mask preserves the
|
|
7673
|
-
star's proportions while leaving a purely visual gap between values.
|
|
7674
|
-
|
|
7675
|
-
|
|
7884
|
+
star's proportions while leaving a purely visual gap between values.
|
|
7885
|
+
A rule that fills a star sets --rating-shape, never mask-image: a state
|
|
7886
|
+
selector outranks the forced-colors mask: none below, and its mask-image
|
|
7887
|
+
would clip the native radio there. */
|
|
7888
|
+
-webkit-mask:
|
|
7889
|
+
var(--rating-shape, var(--rating-star-empty)) center / var(--rating-size) var(--rating-size)
|
|
7890
|
+
no-repeat;
|
|
7891
|
+
mask:
|
|
7892
|
+
var(--rating-shape, var(--rating-star-empty)) center / var(--rating-size) var(--rating-size)
|
|
7893
|
+
no-repeat;
|
|
7676
7894
|
cursor: pointer;
|
|
7677
7895
|
transition: background-color var(--duration);
|
|
7678
7896
|
}
|
|
7679
7897
|
|
|
7680
7898
|
.rating > input[type="radio"]:checked {
|
|
7899
|
+
--rating-shape: var(--rating-star);
|
|
7900
|
+
|
|
7681
7901
|
background: var(--rating-color);
|
|
7682
7902
|
}
|
|
7683
7903
|
|
|
@@ -7689,6 +7909,8 @@ a.avatar[aria-disabled="true"] {
|
|
|
7689
7909
|
.rating > input[type="radio"]:focus-visible {
|
|
7690
7910
|
outline: var(--focus-ring-width) solid var(--focus);
|
|
7691
7911
|
outline-offset: var(--focus-outline-offset);
|
|
7912
|
+
--rating-shape: var(--rating-star);
|
|
7913
|
+
|
|
7692
7914
|
background: var(--rating-color);
|
|
7693
7915
|
}
|
|
7694
7916
|
|
|
@@ -7696,18 +7918,24 @@ a.avatar[aria-disabled="true"] {
|
|
|
7696
7918
|
star. The enhancement only adds cumulative checked and hover previews. */
|
|
7697
7919
|
@supports selector(:has(*)) {
|
|
7698
7920
|
.rating > input[type="radio"]:has(~ input[type="radio"]:checked) {
|
|
7921
|
+
--rating-shape: var(--rating-star);
|
|
7922
|
+
|
|
7699
7923
|
background: var(--rating-color);
|
|
7700
7924
|
}
|
|
7701
7925
|
|
|
7702
7926
|
@media (hover: hover) {
|
|
7703
7927
|
.rating > input[type="radio"]:not(:disabled):hover,
|
|
7704
7928
|
.rating > input[type="radio"]:has(~ input[type="radio"]:not(:disabled):hover) {
|
|
7929
|
+
--rating-shape: var(--rating-star);
|
|
7930
|
+
|
|
7705
7931
|
background: var(--rating-color);
|
|
7706
7932
|
}
|
|
7707
7933
|
|
|
7708
7934
|
/* A hovered value previews exactly that value: later stars are emptied,
|
|
7709
7935
|
including a previously checked star beyond the pointer. */
|
|
7710
7936
|
.rating > input[type="radio"]:not(:disabled):hover ~ input[type="radio"] {
|
|
7937
|
+
--rating-shape: var(--rating-star-empty);
|
|
7938
|
+
|
|
7711
7939
|
background: var(--rating-empty);
|
|
7712
7940
|
}
|
|
7713
7941
|
}
|
|
@@ -7738,6 +7966,29 @@ a.avatar[aria-disabled="true"] {
|
|
|
7738
7966
|
repeat-x;
|
|
7739
7967
|
}
|
|
7740
7968
|
|
|
7969
|
+
/* The filled share in the filled shape, the rest in the empty one:
|
|
7970
|
+
(filled star ∩ value band) ∪ empty star. With the default empty shape it
|
|
7971
|
+
draws exactly the single layer above. Guarded on purpose: the declaration
|
|
7972
|
+
holds var(), so an engine without composite keywords would not drop it at
|
|
7973
|
+
parse time but invalidate it at computed time, leaving no mask at all — a
|
|
7974
|
+
solid bar. Without it (Chromium before 120), a custom empty shape shows as
|
|
7975
|
+
filled-shape empty stars. */
|
|
7976
|
+
@supports (mask-composite: intersect) {
|
|
7977
|
+
.rating[role="img"] {
|
|
7978
|
+
mask:
|
|
7979
|
+
var(--rating-star) left center / calc(var(--rating-size) + var(--rating-gap))
|
|
7980
|
+
var(--rating-size) repeat-x intersect,
|
|
7981
|
+
linear-gradient(
|
|
7982
|
+
var(--rating-direction),
|
|
7983
|
+
#000 var(--rating-fill),
|
|
7984
|
+
transparent var(--rating-fill)
|
|
7985
|
+
)
|
|
7986
|
+
add,
|
|
7987
|
+
var(--rating-star-empty) left center / calc(var(--rating-size) + var(--rating-gap))
|
|
7988
|
+
var(--rating-size) repeat-x;
|
|
7989
|
+
}
|
|
7990
|
+
}
|
|
7991
|
+
|
|
7741
7992
|
/* The fill starts at the inline start; only the direction changes, so the
|
|
7742
7993
|
forced-colors gradient below follows it too. Safari before 16.4 has no
|
|
7743
7994
|
:dir(); the attribute path is its fallback, as in avatar.css. Each selector
|
|
@@ -8473,7 +8724,9 @@ a.avatar[aria-disabled="true"] {
|
|
|
8473
8724
|
* list shared with .drawer, fed by the shared --gap token.
|
|
8474
8725
|
*
|
|
8475
8726
|
* Public hooks:
|
|
8476
|
-
* --
|
|
8727
|
+
* --nav-current-bg (fallback-only: current-link fill)
|
|
8728
|
+
* --nav-current-fg (fallback-only: current-link ink)
|
|
8729
|
+
* --nav-list-indent (fallback-only: nested .nav-list inset)
|
|
8477
8730
|
*
|
|
8478
8731
|
* Internal:
|
|
8479
8732
|
* --gap (local value for the shared gap token)
|
|
@@ -8524,6 +8777,8 @@ a.avatar[aria-disabled="true"] {
|
|
|
8524
8777
|
.nav-link {
|
|
8525
8778
|
display: inline-flex;
|
|
8526
8779
|
align-items: center;
|
|
8780
|
+
/* Icon + label rows; a text-only link has one flex item and shows no gap. */
|
|
8781
|
+
gap: var(--space-20);
|
|
8527
8782
|
min-block-size: var(--control-size-sm);
|
|
8528
8783
|
padding-block: 0;
|
|
8529
8784
|
padding-inline: var(--space-20);
|
|
@@ -8537,43 +8792,45 @@ a.avatar[aria-disabled="true"] {
|
|
|
8537
8792
|
cursor: pointer;
|
|
8538
8793
|
}
|
|
8539
8794
|
|
|
8540
|
-
/* nav-link serves
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8795
|
+
/* nav-link serves three contracts: plain page navigation (aria-current="page"),
|
|
8796
|
+
scrollspy, which toggles aria-current="location" on the active link, and
|
|
8797
|
+
section navigation (aria-current="true"): a link whose section holds the
|
|
8798
|
+
current page without being it, as on .tab. Those three values are the
|
|
8799
|
+
contract; any other, "false" included, is inert.
|
|
8800
|
+
Selection never changes text metrics: the shared medium weight is kept.
|
|
8801
|
+
|
|
8802
|
+
The current link is neutral: full --text ink over a stronger tint of it,
|
|
8803
|
+
against --text-muted at rest. That is a luminance step on both ink and
|
|
8804
|
+
fill, so the state does not rest on hue. A brand-accent ink was measured
|
|
8805
|
+
and dropped: on light presets the accent is already at 4.5:1 on the page,
|
|
8806
|
+
so any fill strong enough to carry the state pushed it under. */
|
|
8545
8807
|
.nav-link:hover {
|
|
8546
8808
|
background: var(--surface-subtle);
|
|
8547
8809
|
color: var(--text);
|
|
8548
8810
|
}
|
|
8549
8811
|
|
|
8550
8812
|
/* Current last, equal specificity to :hover (0,2,0): a hovered current link
|
|
8551
|
-
keeps
|
|
8552
|
-
|
|
8553
|
-
|
|
8554
|
-
|
|
8555
|
-
|
|
8556
|
-
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
|
|
8560
|
-
|
|
8561
|
-
|
|
8562
|
-
|
|
8563
|
-
above keeps the light chip where color-mix is missing, with ink that is
|
|
8564
|
-
legible on it. */
|
|
8813
|
+
keeps its current fill. */
|
|
8814
|
+
.nav-link:is([aria-current="page"], [aria-current="location"], [aria-current="true"]) {
|
|
8815
|
+
background: var(--nav-current-bg, var(--surface-subtle));
|
|
8816
|
+
color: var(--nav-current-fg, var(--text));
|
|
8817
|
+
}
|
|
8818
|
+
|
|
8819
|
+
/* Fills are a tint of the link's own ink, the .btn.ghost hover recipe, so they
|
|
8820
|
+
read on light and dark bars alike, including a bar with its own
|
|
8821
|
+
--ui-bg/--ui-fg. Not --ui-hover-bg: that is the bar's own hover and can
|
|
8822
|
+
equal its fill. Current is a step above hover (18% vs 10%), so the current
|
|
8823
|
+
link stays apart while another is hovered. The baseline above keeps a
|
|
8824
|
+
light chip where color-mix is missing. */
|
|
8565
8825
|
@supports (color: color-mix(in oklch, red, white)) {
|
|
8566
|
-
.nav-link:is(:hover, [aria-current="page"], [aria-current="location"]) {
|
|
8567
|
-
background: color-mix(in oklch, currentColor 10%, transparent);
|
|
8568
|
-
}
|
|
8569
|
-
|
|
8570
8826
|
.nav-link:hover {
|
|
8827
|
+
background: color-mix(in oklch, currentColor 10%, transparent);
|
|
8571
8828
|
color: var(--ui-fg, var(--text));
|
|
8572
8829
|
}
|
|
8573
8830
|
|
|
8574
|
-
|
|
8575
|
-
|
|
8576
|
-
color: var(--
|
|
8831
|
+
.nav-link:is([aria-current="page"], [aria-current="location"], [aria-current="true"]) {
|
|
8832
|
+
background: var(--nav-current-bg, color-mix(in oklch, currentColor 18%, transparent));
|
|
8833
|
+
color: var(--nav-current-fg, var(--ui-fg, var(--text)));
|
|
8577
8834
|
}
|
|
8578
8835
|
}
|
|
8579
8836
|
|
|
@@ -8597,25 +8854,80 @@ a.avatar[aria-disabled="true"] {
|
|
|
8597
8854
|
margin: 0;
|
|
8598
8855
|
}
|
|
8599
8856
|
|
|
8857
|
+
/* The positioning context lives on every row link, so becoming current never
|
|
8858
|
+
moves an app-positioned decoration (or the forced-colors trait below) to a
|
|
8859
|
+
new containing block. */
|
|
8600
8860
|
.nav-list .nav-link {
|
|
8601
8861
|
position: relative;
|
|
8602
8862
|
inline-size: 100%;
|
|
8603
8863
|
}
|
|
8604
8864
|
|
|
8605
|
-
/*
|
|
8606
|
-
|
|
8607
|
-
|
|
8608
|
-
|
|
8609
|
-
|
|
8610
|
-
|
|
8611
|
-
|
|
8612
|
-
|
|
8865
|
+
/* Collapsible group: <details> in a row, <summary class="nav-link"> as its
|
|
8866
|
+
label, a nested .nav-list as its links. The summary takes the link's row,
|
|
8867
|
+
hover and focus; display: inline-flex already drops the list-item marker,
|
|
8868
|
+
the WebKit pseudo is Safari's own. */
|
|
8869
|
+
.nav-list summary.nav-link {
|
|
8870
|
+
list-style: none;
|
|
8871
|
+
}
|
|
8872
|
+
|
|
8873
|
+
.nav-list summary.nav-link::-webkit-details-marker {
|
|
8874
|
+
display: none;
|
|
8875
|
+
}
|
|
8876
|
+
|
|
8877
|
+
/* The open state is the native [open], so the chevron needs no script. */
|
|
8878
|
+
.nav-list summary.nav-link::after {
|
|
8613
8879
|
content: "";
|
|
8614
|
-
|
|
8615
|
-
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8880
|
+
flex: 0 0 auto;
|
|
8881
|
+
margin-inline-start: auto;
|
|
8882
|
+
inline-size: 1rem;
|
|
8883
|
+
block-size: 1rem;
|
|
8884
|
+
background-color: currentColor;
|
|
8885
|
+
-webkit-mask: var(--icon-chevron) center / contain no-repeat;
|
|
8886
|
+
mask: var(--icon-chevron) center / contain no-repeat;
|
|
8887
|
+
transition: transform var(--duration);
|
|
8888
|
+
}
|
|
8889
|
+
|
|
8890
|
+
.nav-list details[open] > summary.nav-link::after {
|
|
8891
|
+
transform: rotate(180deg);
|
|
8892
|
+
}
|
|
8893
|
+
|
|
8894
|
+
/* A nested list is indented so its labels start under the parent's label,
|
|
8895
|
+
past a 1em leading icon and the link gap. Fallback-only: a base
|
|
8896
|
+
declaration on .nav-list would reset an override at every level. */
|
|
8897
|
+
.nav-list .nav-list {
|
|
8898
|
+
margin-block-start: var(--gap);
|
|
8899
|
+
padding-inline-start: var(--nav-list-indent, calc(1em + var(--space-20)));
|
|
8900
|
+
}
|
|
8901
|
+
|
|
8902
|
+
/* Forced colors drops the fill and maps both inks to LinkText, so the current
|
|
8903
|
+
link would be indistinguishable: it gets a shape instead. A vertical row
|
|
8904
|
+
takes an inline-start trait, centered in the link's inline padding with
|
|
8905
|
+
rounded ends; a horizontal link an underline. */
|
|
8906
|
+
@media (forced-colors: active) {
|
|
8907
|
+
.nav-link:is([aria-current="page"], [aria-current="location"], [aria-current="true"]) {
|
|
8908
|
+
text-decoration: underline;
|
|
8909
|
+
text-underline-offset: 0.25em;
|
|
8910
|
+
}
|
|
8911
|
+
|
|
8912
|
+
.nav-list .nav-link:is([aria-current="page"], [aria-current="location"], [aria-current="true"]) {
|
|
8913
|
+
text-decoration: none;
|
|
8914
|
+
}
|
|
8915
|
+
|
|
8916
|
+
/* The chevron is a mask over a fill that forced colors would remap to
|
|
8917
|
+
Canvas, as in accordion.css. */
|
|
8918
|
+
.nav-list summary.nav-link::after {
|
|
8919
|
+
background-color: CanvasText;
|
|
8920
|
+
}
|
|
8921
|
+
|
|
8922
|
+
.nav-list
|
|
8923
|
+
.nav-link:is([aria-current="page"], [aria-current="location"], [aria-current="true"])::before {
|
|
8924
|
+
content: "";
|
|
8925
|
+
position: absolute;
|
|
8926
|
+
inset-block: var(--space-20);
|
|
8927
|
+
inset-inline-start: calc((var(--space-20) - 2px) / 2);
|
|
8928
|
+
border-inline-start: 2px solid currentColor;
|
|
8929
|
+
border-radius: var(--radius-full);
|
|
8930
|
+
}
|
|
8619
8931
|
}
|
|
8620
8932
|
|
|
8621
8933
|
/*
|
|
@@ -9131,7 +9443,8 @@ a.avatar[aria-disabled="true"] {
|
|
|
9131
9443
|
* fill and focus ring, and the native radio stays visible to carry both.
|
|
9132
9444
|
*
|
|
9133
9445
|
* One row of equal shares (grid-auto-columns: 1fr), at least --control-size
|
|
9134
|
-
* tall so it lines up with .btn and .input.
|
|
9446
|
+
* tall so it lines up with .btn and .input; .vertical stacks the segments in
|
|
9447
|
+
* one column instead. Labels wrap instead of truncating;
|
|
9135
9448
|
* a word longer than its share breaks, so the control never overflows its
|
|
9136
9449
|
* container. A strip too long for one row is .tabs, which scrolls.
|
|
9137
9450
|
*
|
|
@@ -9146,6 +9459,9 @@ a.avatar[aria-disabled="true"] {
|
|
|
9146
9459
|
* --segmented-fg
|
|
9147
9460
|
* --segmented-selected-bg
|
|
9148
9461
|
* --segmented-selected-border
|
|
9462
|
+
*
|
|
9463
|
+
* Internal:
|
|
9464
|
+
* --segment-min-size
|
|
9149
9465
|
*/
|
|
9150
9466
|
.segmented {
|
|
9151
9467
|
--segmented-bg: var(--surface-subtle);
|
|
@@ -9183,8 +9499,14 @@ a.avatar[aria-disabled="true"] {
|
|
|
9183
9499
|
own min-block-size: a <fieldset> lays its content in an anonymous box
|
|
9184
9500
|
sized to the content, so a minimum on the track left the segments short.
|
|
9185
9501
|
A minimum, not a height: a wrapped label grows the whole row. */
|
|
9186
|
-
min-
|
|
9502
|
+
--segment-min-size: calc(var(--control-size) - 2 * (var(--segmented-pad) + var(--border-width)));
|
|
9503
|
+
|
|
9504
|
+
min-block-size: var(--segment-min-size);
|
|
9505
|
+
/* why: the block padding gives a wrapped label room, but must never push
|
|
9506
|
+
one line past the minimum: .compact keeps the 16px font in a 32px control,
|
|
9507
|
+
where a fixed 2px made the track 33px against .btn's 32px. */
|
|
9187
9508
|
padding: calc(var(--space-10) / 2) var(--space-30);
|
|
9509
|
+
padding-block: clamp(0px, (var(--segment-min-size) - 1lh) / 2, var(--space-10) / 2);
|
|
9188
9510
|
border: 0;
|
|
9189
9511
|
border-radius: calc(var(--segmented-radius) - var(--segmented-pad));
|
|
9190
9512
|
background: transparent;
|
|
@@ -9205,6 +9527,19 @@ a.avatar[aria-disabled="true"] {
|
|
|
9205
9527
|
box-shadow var(--duration);
|
|
9206
9528
|
}
|
|
9207
9529
|
|
|
9530
|
+
/* Vertical: one segment per row, labels at the inline start. .vertical for
|
|
9531
|
+
radios and links, where aria-orientation is not a valid attribute; a
|
|
9532
|
+
vertical tablist already carries aria-orientation (what the tabs runtime
|
|
9533
|
+
reads for Up/Down), so the layout follows it and cannot disagree. */
|
|
9534
|
+
.segmented:is(.vertical, :where([aria-orientation="vertical"])) {
|
|
9535
|
+
grid-auto-flow: row;
|
|
9536
|
+
}
|
|
9537
|
+
|
|
9538
|
+
.segmented:is(.vertical, :where([aria-orientation="vertical"])) > .segment {
|
|
9539
|
+
justify-content: flex-start;
|
|
9540
|
+
text-align: start;
|
|
9541
|
+
}
|
|
9542
|
+
|
|
9208
9543
|
.segment > input {
|
|
9209
9544
|
margin: 0;
|
|
9210
9545
|
}
|