actual-css 0.19.5 → 0.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +4 -4
  3. package/components.json +6 -3
  4. package/dist/actual.full.css +266 -55
  5. package/dist/actual.full.js +2 -2
  6. package/dist/actual.full.min.css +1 -1
  7. package/dist/types/menu.d.ts +2 -5
  8. package/docs/pages/components/accordion.md +11 -6
  9. package/docs/pages/components/alert.md +64 -62
  10. package/docs/pages/components/avatar.md +12 -12
  11. package/docs/pages/components/badge.md +15 -15
  12. package/docs/pages/components/breadcrumb.md +10 -8
  13. package/docs/pages/components/button.md +66 -7
  14. package/docs/pages/components/card.md +21 -21
  15. package/docs/pages/components/dialog.md +97 -69
  16. package/docs/pages/components/drawer.md +33 -33
  17. package/docs/pages/components/indicator.md +12 -12
  18. package/docs/pages/components/navbar.md +41 -9
  19. package/docs/pages/components/pagination.md +7 -7
  20. package/docs/pages/components/progress.md +18 -13
  21. package/docs/pages/components/rating.md +19 -19
  22. package/docs/pages/components/reveal.md +2 -0
  23. package/docs/pages/components/segmented.md +35 -31
  24. package/docs/pages/components/skeleton.md +10 -8
  25. package/docs/pages/components/spinner.md +21 -15
  26. package/docs/pages/components/table.md +26 -28
  27. package/docs/pages/enhancements/flyout.md +94 -43
  28. package/docs/pages/enhancements/in-view.md +3 -1
  29. package/docs/pages/enhancements/scrollspy.md +51 -18
  30. package/docs/pages/enhancements/tabs.md +43 -37
  31. package/docs/pages/enhancements/tooltip.md +4 -2
  32. package/docs/pages/forms/ajax.md +66 -0
  33. package/docs/pages/forms/choice-cards.md +8 -8
  34. package/docs/pages/forms/color-swatches.md +12 -12
  35. package/docs/pages/forms/form-actions.md +23 -0
  36. package/docs/pages/forms/joined-controls.md +7 -7
  37. package/docs/pages/forms/labels.md +11 -11
  38. package/docs/pages/forms/overview.md +35 -29
  39. package/docs/pages/forms/states-and-sizes.md +9 -9
  40. package/docs/pages/forms/switch.md +35 -4
  41. package/docs/pages/forms/validation.md +16 -16
  42. package/docs/pages/foundations/theming.md +32 -2
  43. package/docs/pages/foundations/tokens.md +7 -5
  44. package/docs/pages/guides/coding-agents.md +18 -0
  45. package/docs/pages/guides/introduction.md +1 -1
  46. package/package.json +4 -1
  47. package/reserved-classes.json +1 -0
  48. package/skills/actual-css/SKILL.md +7 -0
  49. package/src/cli/actual-css.js +1 -1
  50. package/src/css/components/badge.css +10 -6
  51. package/src/css/components/button.css +20 -7
  52. package/src/css/components/join.css +14 -4
  53. package/src/css/components/meter.css +14 -0
  54. package/src/css/components/navbar.css +83 -1
  55. package/src/css/components/pagination.css +3 -1
  56. package/src/css/components/segmented.css +27 -7
  57. package/src/css/components/timeline.css +3 -1
  58. package/src/css/core/theme.css +11 -9
  59. package/src/css/core/tokens.css +7 -1
  60. package/src/css/core/variants.css +2 -0
  61. package/src/css/effects/reveal.css +15 -6
  62. package/src/css/forms/control.css +11 -1
  63. package/src/css/forms/form.css +14 -4
  64. package/src/css/forms/switch.css +32 -7
  65. package/src/js/ajax.js +18 -1
  66. package/src/js/context-menu.js +1 -3
  67. package/src/js/flyout.js +14 -5
  68. package/src/js/in-view.js +41 -30
  69. package/src/js/menu.js +9 -21
  70. package/src/js/surface.js +38 -0
  71. package/src/tooling/design-tokens.js +1 -0
  72. package/src/tooling/theme-contrast.js +22 -11
  73. package/tokens.json +1 -0
@@ -219,6 +219,12 @@ dialog:not([open]) {
219
219
  --control-step-md: 1;
220
220
  --control-step-lg: 0;
221
221
  --control-font-size: var(--font-size-md);
222
+ /* A button label sits one step of the type scale below the field text
223
+ (13/14/16px against 14/16/18px). Selected wherever --control-font-size
224
+ is, so a button inside .join.sm or .field.sm follows the size it sits in;
225
+ density (.compact/.spacious) leaves it alone like the field text. Not a
226
+ ratio: 0.875 put a .sm label at 12.25px. */
227
+ --btn-font-size: var(--font-size-sm);
222
228
  --choice-control-size: 1.125em;
223
229
  --disabled-opacity: 0.65;
224
230
  }
@@ -262,7 +268,7 @@ dialog:not([open]) {
262
268
  is a fallback-only hook whose absence lets each recipe keep its own rim
263
269
  (a tinted rim on .soft, none on the tint), and a theme that sets it gives
264
270
  both a rim of that weight. */
265
- --soft-bg-mix: 88%;
271
+ --soft-bg-mix: 92%;
266
272
  --soft-hover-alpha: 6%;
267
273
  /* Soft foreground: the share of raw intent in soft text. 100% keeps the
268
274
  pure intent color; lower values rebate it toward --text, which vivid or
@@ -505,10 +511,12 @@ dialog:not([open]) {
505
511
  }
506
512
  }
507
513
 
508
- /* Soft foreground hooks — the soft ink is the intent rebated toward the local
509
- text so it keeps 4.5:1 against the soft hover fill (the resting fill carries
510
- the extra margin; variants.css soft recipe). Deliberately scoped to the
511
- default theme: a custom property bakes its var() references where it is
514
+ /* Soft foreground hooks — the soft ink is the raw intent, rebated toward the
515
+ local text only by what keeps 4.5:1 against the hovered fill on
516
+ --surface-subtle, the tightest pair (the resting fill carries the extra
517
+ margin; variants.css soft recipe). A wider mix greys the ink and the softs
518
+ read dull, so each role is tuned to its own threshold. Deliberately scoped
519
+ to the default theme: a custom property bakes its var() references where it is
512
520
  declared, so these resolve against root/light/dark tokens on every boundary.
513
521
  Presets and custom islands keep their --soft-fg-mix / raw-intent ink unless
514
522
  they declare hooks themselves.
@@ -524,11 +532,11 @@ dialog:not([open]) {
524
532
  :where(:root),
525
533
  [data-theme="light"],
526
534
  [data-theme="dark"] {
527
- --secondary-soft-fg: color-mix(in oklab, var(--text) 10%, var(--secondary) 90%);
528
- --success-soft-fg: color-mix(in oklab, var(--text) 15%, var(--success) 85%);
529
- --warning-soft-fg: color-mix(in oklab, var(--text) 25%, var(--warning) 75%);
530
- --danger-soft-fg: color-mix(in oklab, var(--text) 15%, var(--danger) 85%);
531
- --neutral-soft-fg: color-mix(in oklab, var(--text) 20%, var(--neutral) 80%);
535
+ --secondary-soft-fg: var(--secondary);
536
+ --success-soft-fg: color-mix(in oklab, var(--text) 4%, var(--success));
537
+ --warning-soft-fg: color-mix(in oklab, var(--text) 12%, var(--warning));
538
+ --danger-soft-fg: color-mix(in oklab, var(--text) 3%, var(--danger));
539
+ --neutral-soft-fg: color-mix(in oklab, var(--text) 8%, var(--neutral));
532
540
  }
533
541
 
534
542
  :where([data-theme]:not([data-theme="light"]):not([data-theme="dark"])) {
@@ -916,6 +924,7 @@ mark {
916
924
  ).sm {
917
925
  --control-size: var(--control-size-sm);
918
926
  --control-font-size: var(--font-size-sm);
927
+ --btn-font-size: var(--font-size-xs);
919
928
  --control-pad-x: var(--control-pad-x-sm);
920
929
  --control-step-sm: 1;
921
930
  --control-step-md: 0;
@@ -945,6 +954,7 @@ mark {
945
954
  ).lg {
946
955
  --control-size: var(--control-size-lg);
947
956
  --control-font-size: var(--font-size-lg);
957
+ --btn-font-size: var(--font-size-md);
948
958
  --control-pad-x: var(--control-pad-x-lg);
949
959
  --control-step-sm: 0;
950
960
  --control-step-md: 0;
@@ -2338,13 +2348,22 @@ mark {
2338
2348
  border-radius: var(--radius);
2339
2349
  }
2340
2350
 
2341
- .field-label,
2342
- .field-group > legend {
2351
+ /* A label names one control a step below the value it names: at the value's
2352
+ own size the hierarchy rested on weight alone, and a stack of medium
2353
+ labels read louder than the fields. Medium and the full ink keep it a
2354
+ 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. The legend
2356
+ titles a group, one level up, and is set small inside the frame, so it
2357
+ keeps the heavier weight. */
2358
+ .field-label {
2343
2359
  color: var(--text);
2344
- font-weight: var(--font-weight-semibold);
2360
+ font-size: calc(var(--control-font-size) * 0.875);
2361
+ font-weight: var(--font-weight-medium);
2345
2362
  }
2346
2363
 
2347
2364
  .field-group > legend {
2365
+ color: var(--text);
2366
+ font-weight: var(--font-weight-semibold);
2348
2367
  padding-block: 0;
2349
2368
  padding-inline: var(--fieldset-legend-padding-inline, var(--space-10));
2350
2369
  font-size: var(--font-size-xs);
@@ -2360,10 +2379,11 @@ mark {
2360
2379
  border-radius: 0;
2361
2380
  }
2362
2381
 
2382
+ /* Same formula as .field-label: the flush legend is that label. */
2363
2383
  .field-group.flush > legend {
2364
2384
  margin-block-end: var(--space-10);
2365
2385
  padding-inline: 0;
2366
- font-size: var(--control-font-size);
2386
+ font-size: calc(var(--control-font-size) * 0.875);
2367
2387
  }
2368
2388
 
2369
2389
  .field-help {
@@ -2404,10 +2424,18 @@ mark {
2404
2424
  * --btn-border-block-end-* (button.css), for themes that give text controls an
2405
2425
  * underline-style lower edge instead of a uniform border.
2406
2426
  *
2427
+ * --control-default-border is the inherited resting edge, the twin of
2428
+ * --control-default-bg: a theme sets both on its root, where --control-border
2429
+ * itself is owned by the state rules below. Paired with the lower-edge hook it
2430
+ * moves the 3:1 identification to the bottom alone (quiet sides, or none).
2431
+ * readonly and disabled reset the lower edge, so an inherited accent or 3:1
2432
+ * underline never marks a field the user cannot edit.
2433
+ *
2407
2434
  * Public hooks:
2408
2435
  * --control-border
2409
2436
  * --control-bg
2410
2437
  * --control-default-bg
2438
+ * --control-default-border
2411
2439
  * --control-fg
2412
2440
  * --control-cursor
2413
2441
  * --control-shadow
@@ -2419,7 +2447,7 @@ mark {
2419
2447
  .input,
2420
2448
  .textarea,
2421
2449
  .select {
2422
- --control-border: var(--border-control);
2450
+ --control-border: var(--control-default-border, var(--border-control));
2423
2451
  --control-bg: var(--control-default-bg, var(--surface));
2424
2452
  --control-fg: var(--text);
2425
2453
  --control-cursor: auto;
@@ -2490,6 +2518,7 @@ mark {
2490
2518
  .textarea[readonly] {
2491
2519
  --control-bg: var(--surface-subtle);
2492
2520
  --control-border: var(--border);
2521
+ --control-border-block-end-color: initial;
2493
2522
  }
2494
2523
 
2495
2524
  .input:disabled,
@@ -2498,6 +2527,7 @@ mark {
2498
2527
  --control-bg: var(--surface-subtle);
2499
2528
  --control-fg: var(--state-disabled);
2500
2529
  --control-border: var(--border);
2530
+ --control-border-block-end-color: initial;
2501
2531
  --control-cursor: not-allowed;
2502
2532
  }
2503
2533
 
@@ -3202,11 +3232,17 @@ mark {
3202
3232
  }
3203
3233
 
3204
3234
  .switch {
3205
- --switch-bg: var(--border);
3206
- /* The quiet --border track does not stand out from the surface: at rest the
3207
- control edge is what identifies the switch (WCAG 1.4.11, 3:1). Checked and
3208
- disabled tracks drop it for a uniform fill. */
3209
- --switch-border: var(--border-control);
3235
+ /* At rest the track itself is the 3:1 control edge (WCAG 1.4.11): a filled
3236
+ --border-control pill. The track carries the state (neutral off, intent
3237
+ on) and the knob stays one light part that only moves. Two alternatives
3238
+ were measured and set aside: a --border-control ring over a --border
3239
+ fill read as a circled control beside flat fields and buttons, and a
3240
+ dark knob on a quiet track (the knob as the cue) turned the knob dark
3241
+ when off and light when on, as if from two systems. The border takes the
3242
+ fill, so every state stays one uniform shape; a disabled track keeps a
3243
+ quiet --border edge, as a disabled check does. */
3244
+ --switch-bg: var(--border-control);
3245
+ --switch-border: var(--switch-bg);
3210
3246
  --switch-knob: var(--surface-raised);
3211
3247
  --switch-block-size: calc(var(--choice-control-size) + 0.125em);
3212
3248
  --switch-width: calc(var(--switch-block-size) * 1.8);
@@ -3248,6 +3284,21 @@ mark {
3248
3284
  cursor: pointer;
3249
3285
  }
3250
3286
 
3287
+ /* The knob keeps one color through the toggle: light in a light scheme (white
3288
+ on the dark checked track), dark in a dark one, where the checked track turns
3289
+ light and its --intent-fg knob dark. A light resting knob there flipped color
3290
+ on every toggle. The dark resting knob is --surface-opaque, not
3291
+ --surface-raised: --border-control is calibrated to 3:1 against that opaque
3292
+ surface, so the knob holds the same 3:1 against the track in any theme that
3293
+ keeps the contract (3.6:1 on the default palette; --surface-raised gave
3294
+ 1.47:1). light-dark() follows the switch's own color-scheme, so a theme
3295
+ island resolves its branch. Without it the knob stays --surface-raised. */
3296
+ @supports (color: light-dark(red, blue)) {
3297
+ .switch {
3298
+ --switch-knob: light-dark(var(--surface-raised), var(--surface-opaque));
3299
+ }
3300
+ }
3301
+
3251
3302
  /* No elevation on the knob: --shadow is a surface elevation (card, modal,
3252
3303
  drawer, fab), and at this size its 12px blur reads as a smudge that spills
3253
3304
  past the rail while carrying no state. The range thumb — the same kind of
@@ -3277,7 +3328,7 @@ mark {
3277
3328
  than substituting an unsupported mix into both background and border. */
3278
3329
  @supports (color: color-mix(in oklab, black, white)) {
3279
3330
  .switch:not(:checked):hover:not(:disabled) {
3280
- --switch-bg: color-mix(in oklab, var(--text) 10%, var(--border));
3331
+ --switch-bg: color-mix(in oklab, var(--text) 15%, var(--border-control));
3281
3332
  }
3282
3333
  }
3283
3334
 
@@ -3312,9 +3363,13 @@ mark {
3312
3363
  outline-offset: var(--focus-outline-offset);
3313
3364
  }
3314
3365
 
3366
+ /* why: without an edge a disabled track is --surface-subtle on --surface,
3367
+ about 1.05:1, so the switch all but disappeared next to a disabled check
3368
+ that keeps its --border frame. Disabled controls are exempt from 3:1; the
3369
+ quiet edge only keeps the shape, the same way across choice controls. */
3315
3370
  .switch:disabled {
3316
3371
  --switch-bg: var(--surface-subtle);
3317
- --switch-border: var(--switch-bg);
3372
+ --switch-border: var(--border);
3318
3373
  --switch-knob: var(--state-disabled);
3319
3374
  opacity: 1;
3320
3375
  cursor: not-allowed;
@@ -4395,7 +4450,6 @@ mark {
4395
4450
  }
4396
4451
 
4397
4452
  .btn {
4398
- --btn-font-size: var(--control-font-size);
4399
4453
  --btn-min-size: var(--control-size);
4400
4454
  --btn-pad-x: var(--control-pad-x, 1em);
4401
4455
  --btn-bg: var(--ui-bg, var(--btn-default-bg, var(--intent, var(--neutral))));
@@ -4439,9 +4493,16 @@ mark {
4439
4493
  use 0 0 #0000 to remove elevation, since none invalidates that list. */
4440
4494
  box-shadow: var(--btn-shadow, 0 0 #0000);
4441
4495
  font: inherit;
4442
- font-size: var(--btn-font-size);
4496
+ /* why: inherited, not declared here: tokens.css and the .sm/.lg boundaries
4497
+ select it, so an author can also set it on a container. */
4498
+ font-size: var(--btn-font-size, var(--control-font-size));
4499
+ /* why: medium at one step below the field text. Medium at the field text
4500
+ size read dense in Chromium on Windows (system-ui draws 500 like 600).
4501
+ Regular read lighter than the medium field labels. */
4443
4502
  font-weight: var(--font-weight-medium);
4444
- line-height: 1;
4503
+ /* why: 1.25, not 1: a wrapped label's lines touched at 1. A single line
4504
+ keeps its height, since padding-block is derived from 1lh above. */
4505
+ line-height: 1.25;
4445
4506
  text-decoration: none;
4446
4507
  cursor: pointer;
4447
4508
  transition:
@@ -4459,6 +4520,9 @@ mark {
4459
4520
  inline-size: var(--btn-min-size);
4460
4521
  block-size: var(--btn-min-size);
4461
4522
  padding: 0;
4523
+ /* why: an icon font glyph is 1em; it keeps the field text size, not the
4524
+ smaller label step, so the icon fills the square as before. */
4525
+ font-size: var(--control-font-size);
4462
4526
  }
4463
4527
 
4464
4528
  /* .solid/.soft/.outline are shared via variants.css. The baseline --btn-*
@@ -4469,11 +4533,12 @@ mark {
4469
4533
  --ui-border: transparent;
4470
4534
  }
4471
4535
 
4472
- /* A neutral outline is a quiet action, so its edge is the control edge that
4473
- identifies a field, not the full text ink. An explicit intent still wins
4474
- through --intent, and --border-control stays the theme's override point. */
4536
+ /* A neutral outline is a quiet action: its label identifies it, so its edge
4537
+ is the surface border, not the 3:1 control edge a field needs (WCAG 1.4.11
4538
+ asks for no boundary when visible text identifies the control). An explicit
4539
+ intent still wins through --intent. */
4475
4540
  .btn.outline {
4476
- --ui-border: var(--intent, var(--border-control));
4541
+ --ui-border: var(--intent, var(--border));
4477
4542
  }
4478
4543
 
4479
4544
  /* A surface button is neutral chrome, so it hovers at the .outline rate: an
@@ -4564,6 +4629,9 @@ mark {
4564
4629
  min-block-size: auto;
4565
4630
  padding-inline: 0;
4566
4631
  inline-size: fit-content;
4632
+ /* why: a link reads as text, so it takes the size of the sentence around it
4633
+ rather than the button label step. */
4634
+ font-size: inherit;
4567
4635
  max-inline-size: 100%;
4568
4636
  /* No border at all: a link reads through its underline, and the inherited
4569
4637
  .btn border made transparent would turn into a visible box in forced
@@ -4781,10 +4849,11 @@ a.btn[aria-disabled="true"] {
4781
4849
 
4782
4850
  .badge {
4783
4851
  --badge-size: 1.5rem;
4784
- /* A third of the height keeps the pill proportional across local sizes
4785
- without coupling it to the label typography. */
4786
- --badge-pad-x: calc(var(--badge-size) / 3);
4787
- --badge-font-size: var(--font-size-sm);
4852
+ /* Half the height keeps the pill proportional across local sizes without
4853
+ coupling it to the label typography. A label one step under the body
4854
+ text, with this much air, reads as a tag rather than as text on a fill. */
4855
+ --badge-pad-x: calc(var(--badge-size) / 2);
4856
+ --badge-font-size: var(--font-size-xs);
4788
4857
  --badge-icon-size: 1em;
4789
4858
  --badge-dot-size: 0.5rem;
4790
4859
  /* A leading .avatar and a trailing .close are slots: a disc inside the pill
@@ -4840,7 +4909,7 @@ a.btn[aria-disabled="true"] {
4840
4909
 
4841
4910
  .badge.lg {
4842
4911
  --badge-size: 1.875rem;
4843
- --badge-font-size: var(--font-size-md);
4912
+ --badge-font-size: var(--font-size-sm);
4844
4913
  --badge-dot-size: 0.625rem;
4845
4914
  }
4846
4915
 
@@ -5004,7 +5073,10 @@ a.badge[aria-disabled="true"] {
5004
5073
  }
5005
5074
  }
5006
5075
  @media print {
5007
- .badge {
5076
+ /* :empty is named because its border: 0 outranks .badge: a status dot
5077
+ printed without background graphics would vanish. */
5078
+ .badge,
5079
+ .badge:empty {
5008
5080
  border: var(--border-width) solid CanvasText;
5009
5081
  }
5010
5082
  }
@@ -8753,7 +8825,9 @@ a.avatar[aria-disabled="true"] {
8753
8825
  min-block-size: calc(var(--timeline-marker-center) + var(--timeline-rail-size) / 2);
8754
8826
  padding-block-start: var(--timeline-marker-inset);
8755
8827
  padding-inline-start: calc(var(--timeline-rail-size) + var(--timeline-inline-gap));
8756
- line-height: var(--timeline-line-box);
8828
+ /* Firefox falls back to the registered property's initial 0px when its em
8829
+ length sets line-height. Compute the inherited length directly. */
8830
+ line-height: calc(var(--line-height) * 1em);
8757
8831
  }
8758
8832
 
8759
8833
  /* The event owns no rhythm beyond its dateline: block children drop their own
@@ -9006,7 +9080,9 @@ a.avatar[aria-disabled="true"] {
9006
9080
  *
9007
9081
  * .navbar is a horizontal bar; .navbar-brand is the brand link; the inline
9008
9082
  * links are a .cluster using .nav-link items. .nav-list is the vertical nav
9009
- * list shared with .drawer, fed by the shared --gap token.
9083
+ * list shared with .drawer, fed by the shared --gap token. .nav-list.rail is
9084
+ * the table-of-contents form: one rail, the current link a band on it, and a
9085
+ * focus outline that lands on the same band.
9010
9086
  *
9011
9087
  * Public hooks:
9012
9088
  * --nav-current-bg (fallback-only: current-link fill)
@@ -9017,6 +9093,7 @@ a.avatar[aria-disabled="true"] {
9017
9093
  * Internal:
9018
9094
  * --gap (local value for the shared gap token)
9019
9095
  * --nav-list-rail-inset (half the icon on each side of the nested rail)
9096
+ * --nav-list-rail-width (.rail band width, tied to --focus-ring-width)
9020
9097
  */
9021
9098
  /* Intent boundary — inherited intents do not tint this component.
9022
9099
  Local intent classes still win because :where() has zero specificity.
@@ -9195,6 +9272,70 @@ a.avatar[aria-disabled="true"] {
9195
9272
  border-inline-start: var(--border-width) solid var(--nav-list-rail-color, var(--border));
9196
9273
  }
9197
9274
 
9275
+ /* Rail: one band, three independent states. The rail, the current band and
9276
+ the focus line share one width, and every row link reaches under the rail,
9277
+ so the inset focus outline lands its leading edge on the band: focus on the
9278
+ current link continues its band into a frame, focus elsewhere draws its
9279
+ own segment, and the current band stays while focus moves. The width
9280
+ follows --focus-ring-width, prefers-contrast step included, which is what
9281
+ keeps the joint exact. Current is ink plus band, no fill, and the weight
9282
+ stays constant like every .nav-link. */
9283
+ .nav-list.rail {
9284
+ --gap: 0;
9285
+ --nav-list-rail-width: var(--focus-ring-width);
9286
+ border-inline-start: var(--nav-list-rail-width) solid var(--nav-list-rail-color, var(--border));
9287
+ }
9288
+
9289
+ /* A nested list joins the outer rail instead of hanging its own: its links
9290
+ reach the same band and indent one step further. Deeper levels share that
9291
+ indent. */
9292
+ .nav-list.rail .nav-list {
9293
+ --gap: 0;
9294
+ margin-inline-start: 0;
9295
+ padding-inline-start: 0;
9296
+ border-inline-start: 0;
9297
+ }
9298
+
9299
+ .nav-list.rail .nav-link {
9300
+ margin-inline-start: calc(-1 * var(--nav-list-rail-width));
9301
+ inline-size: calc(100% + var(--nav-list-rail-width));
9302
+ padding-inline-start: calc(var(--space-30) + var(--nav-list-rail-width));
9303
+ border-radius: 0;
9304
+ }
9305
+
9306
+ .nav-list.rail .nav-list .nav-link {
9307
+ padding-inline-start: calc(var(--space-30) * 2 + var(--nav-list-rail-width));
9308
+ }
9309
+
9310
+ .nav-list.rail
9311
+ .nav-link:is([aria-current="page"], [aria-current="location"], [aria-current="true"]) {
9312
+ background: var(--nav-current-bg, transparent);
9313
+ }
9314
+
9315
+ /* The band marks aria-current, and :target-current while native scrollspy
9316
+ (scrollspy.css) leads, before the script sets aria-current. :is() is a
9317
+ forgiving list: an engine without :has() or :target-current drops that
9318
+ branch, not the rule. The link stays the subject, so the band is its slot. */
9319
+ .nav-list.rail
9320
+ .nav-link:is(
9321
+ [aria-current="page"],
9322
+ [aria-current="location"],
9323
+ [aria-current="true"],
9324
+ .nav-list.rail:not(:has([aria-current="location"])) :target-current
9325
+ )::before {
9326
+ content: "";
9327
+ position: absolute;
9328
+ inset-block: 0;
9329
+ inset-inline-start: 0;
9330
+ border-inline-start: var(--nav-list-rail-width) solid var(--focus);
9331
+ }
9332
+
9333
+ /* Inset, so the leading edge covers the band instead of standing beside it,
9334
+ and a scrollport (a sticky TOC) never clips the ring. */
9335
+ .nav-list.rail .nav-link:focus-visible {
9336
+ outline-offset: calc(var(--focus-ring-width) * -1);
9337
+ }
9338
+
9198
9339
  /* Forced colors drops the fill and maps both inks to LinkText, so the current
9199
9340
  link would be indistinguishable: it gets a shape instead. A vertical row
9200
9341
  takes an inline-start trait, centered in the link's inline padding with
@@ -9224,6 +9365,21 @@ a.avatar[aria-disabled="true"] {
9224
9365
  border-inline-start: 2px solid currentColor;
9225
9366
  border-radius: var(--radius-full);
9226
9367
  }
9368
+
9369
+ /* On a rail the trait is the band itself (its position outranks the trait
9370
+ above). Forced colors paint the rail and the band in the same CanvasText,
9371
+ so the band differs by shape, not by a repainted color: it grows inward
9372
+ past the rail, into the link's inline padding. */
9373
+ .nav-list.rail
9374
+ .nav-link:is(
9375
+ [aria-current="page"],
9376
+ [aria-current="location"],
9377
+ [aria-current="true"],
9378
+ .nav-list.rail:not(:has([aria-current="location"])) :target-current
9379
+ )::before {
9380
+ border-inline-start-width: calc(var(--nav-list-rail-width) * 2.5);
9381
+ border-radius: 0;
9382
+ }
9227
9383
  }
9228
9384
 
9229
9385
  /*
@@ -9370,7 +9526,9 @@ a.avatar[aria-disabled="true"] {
9370
9526
  margin: 0;
9371
9527
  padding: 0;
9372
9528
  list-style: none;
9373
- font-size: var(--control-font-size);
9529
+ /* why: the truncation ellipsis is text, not a .btn; it takes the button
9530
+ label size so it reads at the page numbers' size. */
9531
+ font-size: var(--btn-font-size);
9374
9532
 
9375
9533
  /* Arrows, page numbers, and truncation ellipses share one geometric
9376
9534
  system: equal digit widths keep the row from re-flowing as numbers grow
@@ -9754,7 +9912,8 @@ a.avatar[aria-disabled="true"] {
9754
9912
  * --segmented-radius
9755
9913
  * --segmented-fg
9756
9914
  * --segmented-selected-bg
9757
- * --segmented-selected-border
9915
+ * --segmented-selected-border (fallback-only: no edge by default; a theme sets
9916
+ * it once on its root, e.g. a flat theme whose selected pill has no shadow)
9758
9917
  *
9759
9918
  * Internal:
9760
9919
  * --segment-min-size
@@ -9765,9 +9924,6 @@ a.avatar[aria-disabled="true"] {
9765
9924
  --segmented-radius: var(--radius);
9766
9925
  --segmented-fg: var(--text-muted);
9767
9926
  --segmented-selected-bg: var(--surface-raised);
9768
- /* The edge is what separates the selected segment where --surface-raised
9769
- is darker than --surface-subtle (the default dark palette). */
9770
- --segmented-selected-border: var(--border);
9771
9927
 
9772
9928
  display: inline-grid;
9773
9929
  grid-auto-flow: column;
@@ -9785,6 +9941,21 @@ a.avatar[aria-disabled="true"] {
9785
9941
  vertical-align: middle;
9786
9942
  }
9787
9943
 
9944
+ /* A dark scheme puts --surface-raised below --surface-subtle, so the selected
9945
+ pill read as a recess in the rail. There it rises above the rail instead,
9946
+ like the switch knob; a light scheme keeps the raised surface.
9947
+ light-dark() follows the track's own color-scheme (theme islands included);
9948
+ without it a dark pill stays --surface-raised, a degraded selection carried
9949
+ by the --text ink against --text-muted. */
9950
+ @supports (color: light-dark(red, blue)) {
9951
+ .segmented {
9952
+ --segmented-selected-bg: light-dark(
9953
+ var(--surface-raised),
9954
+ color-mix(in oklab, var(--text) 14%, var(--surface-subtle))
9955
+ );
9956
+ }
9957
+ }
9958
+
9788
9959
  .segment {
9789
9960
  position: relative;
9790
9961
  display: flex;
@@ -9862,12 +10033,19 @@ a.avatar[aria-disabled="true"] {
9862
10033
  }
9863
10034
 
9864
10035
  /* Separate rules from the :has() forms below: an engine without :has() would
9865
- discard a shared selector list, ARIA states included. */
10036
+ discard a shared selector list, ARIA states included.
10037
+ The selected pill is set apart by its fill, its shadow and the full --text
10038
+ ink against --text-muted; no edge by default. --segmented-selected-border
10039
+ is read, never declared here, so a theme (a flat one without --shadow) can
10040
+ restore the edge once on its root.
10041
+ Trap: the ring and --shadow share one box-shadow list, and `none` is not a
10042
+ list item. A theme that sets --shadow: none drops the whole declaration,
10043
+ ring included; flatten shadows with --shadow-color: transparent instead. */
9866
10044
  .segment:is([aria-selected="true"], [aria-current="page"], [aria-current="true"]) {
9867
10045
  background: var(--segmented-selected-bg);
9868
10046
  color: var(--text);
9869
10047
  box-shadow:
9870
- 0 0 0 var(--border-width) var(--segmented-selected-border),
10048
+ 0 0 0 var(--border-width) var(--segmented-selected-border, transparent),
9871
10049
  var(--shadow);
9872
10050
  }
9873
10051
 
@@ -9875,7 +10053,7 @@ a.avatar[aria-disabled="true"] {
9875
10053
  background: var(--segmented-selected-bg);
9876
10054
  color: var(--text);
9877
10055
  box-shadow:
9878
- 0 0 0 var(--border-width) var(--segmented-selected-border),
10056
+ 0 0 0 var(--border-width) var(--segmented-selected-border, transparent),
9879
10057
  var(--shadow);
9880
10058
  }
9881
10059
 
@@ -10364,6 +10542,20 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
10364
10542
  border-radius: var(--radius-full);
10365
10543
  }
10366
10544
 
10545
+ /* The background shorthand clears Gecko's native gradient. Keep state
10546
+ specificity inside :where() so Highlight can still override the fill. */
10547
+ .meter:where(:-moz-meter-optimum)::-moz-meter-bar {
10548
+ background: var(--success);
10549
+ }
10550
+
10551
+ .meter:where(:-moz-meter-sub-optimum)::-moz-meter-bar {
10552
+ background: var(--warning);
10553
+ }
10554
+
10555
+ .meter:where(:-moz-meter-sub-sub-optimum)::-moz-meter-bar {
10556
+ background: var(--danger);
10557
+ }
10558
+
10367
10559
  @media (forced-colors: active) {
10368
10560
  .meter::-webkit-meter-optimum-value,
10369
10561
  .meter::-webkit-meter-suboptimum-value,
@@ -10421,7 +10613,7 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
10421
10613
  }
10422
10614
 
10423
10615
  .join-addon {
10424
- --control-border: var(--border-control);
10616
+ --control-border: var(--control-default-border, var(--border-control));
10425
10617
  --control-bg: var(--surface-subtle);
10426
10618
  --control-fg: var(--text-muted);
10427
10619
 
@@ -10532,9 +10724,19 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
10532
10724
 
10533
10725
  /* Text controls paint their own inset focus outline (control.css), so a
10534
10726
  .join never moves the ring to the group: button-only groups and wrapped
10535
- inputs alike keep per-control focus, with no :has() group treatment.
10536
- A neutral outline action draws the same --border-control edge as the field
10537
- by its own base rule, so the group needs no special case. */
10727
+ inputs alike keep per-control focus, with no :has() group treatment. */
10728
+
10729
+ /* Beside a field, a neutral outline action is a segment of that field and
10730
+ takes its edge; alone or among buttons it keeps its quieter --border edge.
10731
+ Without :has() the rule drops and the button keeps --border: a lighter
10732
+ segment, still bounded. */
10733
+ .join:has(> :is(.input, .textarea, .select), > * > :is(.input, .textarea, .select)) > .btn.outline {
10734
+ --ui-border: var(--intent, var(--control-default-border, var(--border-control)));
10735
+ --btn-border-block-end-color: var(
10736
+ --intent,
10737
+ var(--control-border-block-end-color, var(--btn-border))
10738
+ );
10739
+ }
10538
10740
 
10539
10741
  /* Effects — purely visual enrichments. */
10540
10742
  /*
@@ -10821,21 +11023,24 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
10821
11023
  * lost its hover motion). The `animation` shorthand still replaces another
10822
11024
  * animation on the same element, which is the remaining composition limit.
10823
11025
  *
10824
- * Fill mode `backwards` holds the first keyframe through a stagger delay and
10825
- * leaves no animated value in the cascade once the entrance ends. A pending
10826
- * element revealed by focus has its new animation finished by in-view.js,
10827
- * because a :focus-within override lapses on blur and replays the entrance.
11026
+ * Fill mode `backwards` holds the first keyframe through a delay and leaves no
11027
+ * animated value in the cascade once the entrance ends. Focus inside an
11028
+ * element with in-view.js finishes its entrance there, because a :focus-within
11029
+ * override lapses on blur: the entrance resumes from its timeline. `.reveal`
11030
+ * alone has no such guard while its first-render entrance runs.
10828
11031
  *
10829
11032
  * Public hooks:
10830
11033
  * --reveal-duration
10831
11034
  * --reveal-distance
10832
11035
  * --reveal-stagger
11036
+ * --reveal-delay
10833
11037
  */
10834
11038
  .reveal,
10835
11039
  .reveal-group {
10836
11040
  --reveal-duration: 450ms;
10837
11041
  --reveal-distance: 1rem;
10838
11042
  --reveal-stagger: 60ms;
11043
+ --reveal-delay: 0ms;
10839
11044
  }
10840
11045
 
10841
11046
  @media screen and (prefers-reduced-motion: no-preference) {
@@ -10844,14 +11049,20 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
10844
11049
  /* The gentler ease-out keeps the fade gradual; surface entrance timing
10845
11050
  makes most of the content visible too early. */
10846
11051
  animation: actual-reveal var(--reveal-duration) ease-out backwards;
11052
+ /* Also the group's delay when sibling-index() is unsupported. */
11053
+ animation-delay: var(--reveal-delay);
10847
11054
  }
10848
11055
 
10849
11056
  /* The cap keeps a long list from becoming an endless cascade: the ninth and
10850
11057
  later items share the eighth step's delay. An engine without
10851
11058
  sibling-index() drops this declaration alone and reveals the group
10852
- together, which is the intended degradation. */
11059
+ together after the base delay, which is the intended degradation. */
10853
11060
  .reveal-group > * {
10854
- animation-delay: calc(min(sibling-index() - 1, 8) * var(--reveal-stagger));
11061
+ animation-delay: calc(
11062
+ var(--reveal-delay) +
11063
+ min(sibling-index() - 1, 8) *
11064
+ var(--reveal-stagger)
11065
+ );
10855
11066
  }
10856
11067
 
10857
11068
  .reveal.is-pending,