actual-css 0.19.5 → 0.20.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 +59 -0
- package/README.md +4 -4
- package/components.json +6 -3
- package/dist/actual.full.css +249 -54
- package/dist/actual.full.js +2 -2
- package/dist/actual.full.min.css +1 -1
- package/dist/types/menu.d.ts +2 -5
- package/docs/pages/components/accordion.md +11 -6
- package/docs/pages/components/alert.md +64 -62
- package/docs/pages/components/avatar.md +12 -12
- package/docs/pages/components/badge.md +15 -15
- package/docs/pages/components/breadcrumb.md +10 -8
- package/docs/pages/components/button.md +56 -7
- package/docs/pages/components/card.md +21 -21
- package/docs/pages/components/dialog.md +97 -69
- package/docs/pages/components/drawer.md +33 -33
- package/docs/pages/components/indicator.md +12 -12
- package/docs/pages/components/navbar.md +41 -9
- package/docs/pages/components/pagination.md +7 -7
- package/docs/pages/components/progress.md +18 -13
- package/docs/pages/components/rating.md +19 -19
- package/docs/pages/components/reveal.md +2 -0
- package/docs/pages/components/segmented.md +35 -31
- package/docs/pages/components/skeleton.md +10 -8
- package/docs/pages/components/spinner.md +21 -15
- package/docs/pages/components/table.md +26 -28
- package/docs/pages/enhancements/flyout.md +94 -43
- package/docs/pages/enhancements/in-view.md +3 -1
- package/docs/pages/enhancements/scrollspy.md +51 -18
- package/docs/pages/enhancements/tabs.md +43 -37
- package/docs/pages/enhancements/tooltip.md +4 -2
- package/docs/pages/forms/ajax.md +66 -0
- package/docs/pages/forms/choice-cards.md +8 -8
- package/docs/pages/forms/color-swatches.md +12 -12
- package/docs/pages/forms/form-actions.md +23 -0
- package/docs/pages/forms/joined-controls.md +7 -7
- package/docs/pages/forms/labels.md +11 -11
- package/docs/pages/forms/overview.md +35 -29
- package/docs/pages/forms/states-and-sizes.md +9 -9
- package/docs/pages/forms/switch.md +35 -4
- package/docs/pages/forms/validation.md +16 -16
- package/docs/pages/foundations/theming.md +32 -2
- package/docs/pages/foundations/tokens.md +7 -5
- package/docs/pages/guides/coding-agents.md +18 -0
- package/docs/pages/guides/introduction.md +1 -1
- package/package.json +2 -1
- package/reserved-classes.json +1 -0
- package/skills/actual-css/SKILL.md +7 -0
- package/src/cli/actual-css.js +1 -1
- package/src/css/components/badge.css +10 -6
- package/src/css/components/button.css +20 -7
- package/src/css/components/join.css +14 -4
- package/src/css/components/navbar.css +83 -1
- package/src/css/components/pagination.css +3 -1
- package/src/css/components/segmented.css +27 -7
- package/src/css/core/theme.css +11 -9
- package/src/css/core/tokens.css +7 -1
- package/src/css/core/variants.css +2 -0
- package/src/css/effects/reveal.css +15 -6
- package/src/css/forms/control.css +11 -1
- package/src/css/forms/form.css +14 -4
- package/src/css/forms/switch.css +32 -7
- package/src/js/ajax.js +18 -1
- package/src/js/context-menu.js +1 -3
- package/src/js/flyout.js +14 -5
- package/src/js/in-view.js +41 -30
- package/src/js/menu.js +9 -21
- package/src/js/surface.js +38 -0
- package/src/tooling/design-tokens.js +1 -0
- package/src/tooling/theme-contrast.js +22 -11
- package/tokens.json +1 -0
package/dist/actual.full.css
CHANGED
|
@@ -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:
|
|
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
|
|
509
|
-
text
|
|
510
|
-
the
|
|
511
|
-
|
|
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:
|
|
528
|
-
--success-soft-fg: color-mix(in oklab, var(--text)
|
|
529
|
-
--warning-soft-fg: color-mix(in oklab, var(--text)
|
|
530
|
-
--danger-soft-fg: color-mix(in oklab, var(--text)
|
|
531
|
-
--neutral-soft-fg: color-mix(in oklab, var(--text)
|
|
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
|
-
|
|
2342
|
-
|
|
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-
|
|
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
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
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)
|
|
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(--
|
|
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
|
-
|
|
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, worst with system-ui on Windows (500 renders close to
|
|
4501
|
+
semibold); regular read lighter than the medium field labels. */
|
|
4443
4502
|
font-weight: var(--font-weight-medium);
|
|
4444
|
-
|
|
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
|
|
4473
|
-
|
|
4474
|
-
|
|
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
|
|
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
|
-
/*
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
--badge-
|
|
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-
|
|
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
|
}
|
|
@@ -9006,7 +9078,9 @@ a.avatar[aria-disabled="true"] {
|
|
|
9006
9078
|
*
|
|
9007
9079
|
* .navbar is a horizontal bar; .navbar-brand is the brand link; the inline
|
|
9008
9080
|
* 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.
|
|
9081
|
+
* list shared with .drawer, fed by the shared --gap token. .nav-list.rail is
|
|
9082
|
+
* the table-of-contents form: one rail, the current link a band on it, and a
|
|
9083
|
+
* focus outline that lands on the same band.
|
|
9010
9084
|
*
|
|
9011
9085
|
* Public hooks:
|
|
9012
9086
|
* --nav-current-bg (fallback-only: current-link fill)
|
|
@@ -9017,6 +9091,7 @@ a.avatar[aria-disabled="true"] {
|
|
|
9017
9091
|
* Internal:
|
|
9018
9092
|
* --gap (local value for the shared gap token)
|
|
9019
9093
|
* --nav-list-rail-inset (half the icon on each side of the nested rail)
|
|
9094
|
+
* --nav-list-rail-width (.rail band width, tied to --focus-ring-width)
|
|
9020
9095
|
*/
|
|
9021
9096
|
/* Intent boundary — inherited intents do not tint this component.
|
|
9022
9097
|
Local intent classes still win because :where() has zero specificity.
|
|
@@ -9195,6 +9270,70 @@ a.avatar[aria-disabled="true"] {
|
|
|
9195
9270
|
border-inline-start: var(--border-width) solid var(--nav-list-rail-color, var(--border));
|
|
9196
9271
|
}
|
|
9197
9272
|
|
|
9273
|
+
/* Rail: one band, three independent states. The rail, the current band and
|
|
9274
|
+
the focus line share one width, and every row link reaches under the rail,
|
|
9275
|
+
so the inset focus outline lands its leading edge on the band: focus on the
|
|
9276
|
+
current link continues its band into a frame, focus elsewhere draws its
|
|
9277
|
+
own segment, and the current band stays while focus moves. The width
|
|
9278
|
+
follows --focus-ring-width, prefers-contrast step included, which is what
|
|
9279
|
+
keeps the joint exact. Current is ink plus band, no fill, and the weight
|
|
9280
|
+
stays constant like every .nav-link. */
|
|
9281
|
+
.nav-list.rail {
|
|
9282
|
+
--gap: 0;
|
|
9283
|
+
--nav-list-rail-width: var(--focus-ring-width);
|
|
9284
|
+
border-inline-start: var(--nav-list-rail-width) solid var(--nav-list-rail-color, var(--border));
|
|
9285
|
+
}
|
|
9286
|
+
|
|
9287
|
+
/* A nested list joins the outer rail instead of hanging its own: its links
|
|
9288
|
+
reach the same band and indent one step further. Deeper levels share that
|
|
9289
|
+
indent. */
|
|
9290
|
+
.nav-list.rail .nav-list {
|
|
9291
|
+
--gap: 0;
|
|
9292
|
+
margin-inline-start: 0;
|
|
9293
|
+
padding-inline-start: 0;
|
|
9294
|
+
border-inline-start: 0;
|
|
9295
|
+
}
|
|
9296
|
+
|
|
9297
|
+
.nav-list.rail .nav-link {
|
|
9298
|
+
margin-inline-start: calc(-1 * var(--nav-list-rail-width));
|
|
9299
|
+
inline-size: calc(100% + var(--nav-list-rail-width));
|
|
9300
|
+
padding-inline-start: calc(var(--space-30) + var(--nav-list-rail-width));
|
|
9301
|
+
border-radius: 0;
|
|
9302
|
+
}
|
|
9303
|
+
|
|
9304
|
+
.nav-list.rail .nav-list .nav-link {
|
|
9305
|
+
padding-inline-start: calc(var(--space-30) * 2 + var(--nav-list-rail-width));
|
|
9306
|
+
}
|
|
9307
|
+
|
|
9308
|
+
.nav-list.rail
|
|
9309
|
+
.nav-link:is([aria-current="page"], [aria-current="location"], [aria-current="true"]) {
|
|
9310
|
+
background: var(--nav-current-bg, transparent);
|
|
9311
|
+
}
|
|
9312
|
+
|
|
9313
|
+
/* The band marks aria-current, and :target-current while native scrollspy
|
|
9314
|
+
(scrollspy.css) leads, before the script sets aria-current. :is() is a
|
|
9315
|
+
forgiving list: an engine without :has() or :target-current drops that
|
|
9316
|
+
branch, not the rule. The link stays the subject, so the band is its slot. */
|
|
9317
|
+
.nav-list.rail
|
|
9318
|
+
.nav-link:is(
|
|
9319
|
+
[aria-current="page"],
|
|
9320
|
+
[aria-current="location"],
|
|
9321
|
+
[aria-current="true"],
|
|
9322
|
+
.nav-list.rail:not(:has([aria-current="location"])) :target-current
|
|
9323
|
+
)::before {
|
|
9324
|
+
content: "";
|
|
9325
|
+
position: absolute;
|
|
9326
|
+
inset-block: 0;
|
|
9327
|
+
inset-inline-start: 0;
|
|
9328
|
+
border-inline-start: var(--nav-list-rail-width) solid var(--focus);
|
|
9329
|
+
}
|
|
9330
|
+
|
|
9331
|
+
/* Inset, so the leading edge covers the band instead of standing beside it,
|
|
9332
|
+
and a scrollport (a sticky TOC) never clips the ring. */
|
|
9333
|
+
.nav-list.rail .nav-link:focus-visible {
|
|
9334
|
+
outline-offset: calc(var(--focus-ring-width) * -1);
|
|
9335
|
+
}
|
|
9336
|
+
|
|
9198
9337
|
/* Forced colors drops the fill and maps both inks to LinkText, so the current
|
|
9199
9338
|
link would be indistinguishable: it gets a shape instead. A vertical row
|
|
9200
9339
|
takes an inline-start trait, centered in the link's inline padding with
|
|
@@ -9224,6 +9363,21 @@ a.avatar[aria-disabled="true"] {
|
|
|
9224
9363
|
border-inline-start: 2px solid currentColor;
|
|
9225
9364
|
border-radius: var(--radius-full);
|
|
9226
9365
|
}
|
|
9366
|
+
|
|
9367
|
+
/* On a rail the trait is the band itself (its position outranks the trait
|
|
9368
|
+
above). Forced colors paint the rail and the band in the same CanvasText,
|
|
9369
|
+
so the band differs by shape, not by a repainted color: it grows inward
|
|
9370
|
+
past the rail, into the link's inline padding. */
|
|
9371
|
+
.nav-list.rail
|
|
9372
|
+
.nav-link:is(
|
|
9373
|
+
[aria-current="page"],
|
|
9374
|
+
[aria-current="location"],
|
|
9375
|
+
[aria-current="true"],
|
|
9376
|
+
.nav-list.rail:not(:has([aria-current="location"])) :target-current
|
|
9377
|
+
)::before {
|
|
9378
|
+
border-inline-start-width: calc(var(--nav-list-rail-width) * 2.5);
|
|
9379
|
+
border-radius: 0;
|
|
9380
|
+
}
|
|
9227
9381
|
}
|
|
9228
9382
|
|
|
9229
9383
|
/*
|
|
@@ -9370,7 +9524,9 @@ a.avatar[aria-disabled="true"] {
|
|
|
9370
9524
|
margin: 0;
|
|
9371
9525
|
padding: 0;
|
|
9372
9526
|
list-style: none;
|
|
9373
|
-
|
|
9527
|
+
/* why: the truncation ellipsis is text, not a .btn; it takes the button
|
|
9528
|
+
label size so it reads at the page numbers' size. */
|
|
9529
|
+
font-size: var(--btn-font-size);
|
|
9374
9530
|
|
|
9375
9531
|
/* Arrows, page numbers, and truncation ellipses share one geometric
|
|
9376
9532
|
system: equal digit widths keep the row from re-flowing as numbers grow
|
|
@@ -9754,7 +9910,8 @@ a.avatar[aria-disabled="true"] {
|
|
|
9754
9910
|
* --segmented-radius
|
|
9755
9911
|
* --segmented-fg
|
|
9756
9912
|
* --segmented-selected-bg
|
|
9757
|
-
* --segmented-selected-border
|
|
9913
|
+
* --segmented-selected-border (fallback-only: no edge by default; a theme sets
|
|
9914
|
+
* it once on its root, e.g. a flat theme whose selected pill has no shadow)
|
|
9758
9915
|
*
|
|
9759
9916
|
* Internal:
|
|
9760
9917
|
* --segment-min-size
|
|
@@ -9765,9 +9922,6 @@ a.avatar[aria-disabled="true"] {
|
|
|
9765
9922
|
--segmented-radius: var(--radius);
|
|
9766
9923
|
--segmented-fg: var(--text-muted);
|
|
9767
9924
|
--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
9925
|
|
|
9772
9926
|
display: inline-grid;
|
|
9773
9927
|
grid-auto-flow: column;
|
|
@@ -9785,6 +9939,21 @@ a.avatar[aria-disabled="true"] {
|
|
|
9785
9939
|
vertical-align: middle;
|
|
9786
9940
|
}
|
|
9787
9941
|
|
|
9942
|
+
/* A dark scheme puts --surface-raised below --surface-subtle, so the selected
|
|
9943
|
+
pill read as a recess in the rail. There it rises above the rail instead,
|
|
9944
|
+
like the switch knob; a light scheme keeps the raised surface.
|
|
9945
|
+
light-dark() follows the track's own color-scheme (theme islands included);
|
|
9946
|
+
without it a dark pill stays --surface-raised, a degraded selection carried
|
|
9947
|
+
by the --text ink against --text-muted. */
|
|
9948
|
+
@supports (color: light-dark(red, blue)) {
|
|
9949
|
+
.segmented {
|
|
9950
|
+
--segmented-selected-bg: light-dark(
|
|
9951
|
+
var(--surface-raised),
|
|
9952
|
+
color-mix(in oklab, var(--text) 14%, var(--surface-subtle))
|
|
9953
|
+
);
|
|
9954
|
+
}
|
|
9955
|
+
}
|
|
9956
|
+
|
|
9788
9957
|
.segment {
|
|
9789
9958
|
position: relative;
|
|
9790
9959
|
display: flex;
|
|
@@ -9862,12 +10031,19 @@ a.avatar[aria-disabled="true"] {
|
|
|
9862
10031
|
}
|
|
9863
10032
|
|
|
9864
10033
|
/* Separate rules from the :has() forms below: an engine without :has() would
|
|
9865
|
-
discard a shared selector list, ARIA states included.
|
|
10034
|
+
discard a shared selector list, ARIA states included.
|
|
10035
|
+
The selected pill is set apart by its fill, its shadow and the full --text
|
|
10036
|
+
ink against --text-muted; no edge by default. --segmented-selected-border
|
|
10037
|
+
is read, never declared here, so a theme (a flat one without --shadow) can
|
|
10038
|
+
restore the edge once on its root.
|
|
10039
|
+
Trap: the ring and --shadow share one box-shadow list, and `none` is not a
|
|
10040
|
+
list item. A theme that sets --shadow: none drops the whole declaration,
|
|
10041
|
+
ring included; flatten shadows with --shadow-color: transparent instead. */
|
|
9866
10042
|
.segment:is([aria-selected="true"], [aria-current="page"], [aria-current="true"]) {
|
|
9867
10043
|
background: var(--segmented-selected-bg);
|
|
9868
10044
|
color: var(--text);
|
|
9869
10045
|
box-shadow:
|
|
9870
|
-
0 0 0 var(--border-width) var(--segmented-selected-border),
|
|
10046
|
+
0 0 0 var(--border-width) var(--segmented-selected-border, transparent),
|
|
9871
10047
|
var(--shadow);
|
|
9872
10048
|
}
|
|
9873
10049
|
|
|
@@ -9875,7 +10051,7 @@ a.avatar[aria-disabled="true"] {
|
|
|
9875
10051
|
background: var(--segmented-selected-bg);
|
|
9876
10052
|
color: var(--text);
|
|
9877
10053
|
box-shadow:
|
|
9878
|
-
0 0 0 var(--border-width) var(--segmented-selected-border),
|
|
10054
|
+
0 0 0 var(--border-width) var(--segmented-selected-border, transparent),
|
|
9879
10055
|
var(--shadow);
|
|
9880
10056
|
}
|
|
9881
10057
|
|
|
@@ -10421,7 +10597,7 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
|
|
|
10421
10597
|
}
|
|
10422
10598
|
|
|
10423
10599
|
.join-addon {
|
|
10424
|
-
--control-border: var(--border-control);
|
|
10600
|
+
--control-border: var(--control-default-border, var(--border-control));
|
|
10425
10601
|
--control-bg: var(--surface-subtle);
|
|
10426
10602
|
--control-fg: var(--text-muted);
|
|
10427
10603
|
|
|
@@ -10532,9 +10708,19 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
|
|
|
10532
10708
|
|
|
10533
10709
|
/* Text controls paint their own inset focus outline (control.css), so a
|
|
10534
10710
|
.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
|
-
|
|
10537
|
-
|
|
10711
|
+
inputs alike keep per-control focus, with no :has() group treatment. */
|
|
10712
|
+
|
|
10713
|
+
/* Beside a field, a neutral outline action is a segment of that field and
|
|
10714
|
+
takes its edge; alone or among buttons it keeps its quieter --border edge.
|
|
10715
|
+
Without :has() the rule drops and the button keeps --border: a lighter
|
|
10716
|
+
segment, still bounded. */
|
|
10717
|
+
.join:has(> :is(.input, .textarea, .select), > * > :is(.input, .textarea, .select)) > .btn.outline {
|
|
10718
|
+
--ui-border: var(--intent, var(--control-default-border, var(--border-control)));
|
|
10719
|
+
--btn-border-block-end-color: var(
|
|
10720
|
+
--intent,
|
|
10721
|
+
var(--control-border-block-end-color, var(--btn-border))
|
|
10722
|
+
);
|
|
10723
|
+
}
|
|
10538
10724
|
|
|
10539
10725
|
/* Effects — purely visual enrichments. */
|
|
10540
10726
|
/*
|
|
@@ -10821,21 +11007,24 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
|
|
|
10821
11007
|
* lost its hover motion). The `animation` shorthand still replaces another
|
|
10822
11008
|
* animation on the same element, which is the remaining composition limit.
|
|
10823
11009
|
*
|
|
10824
|
-
* Fill mode `backwards` holds the first keyframe through a
|
|
10825
|
-
*
|
|
10826
|
-
* element
|
|
10827
|
-
*
|
|
11010
|
+
* Fill mode `backwards` holds the first keyframe through a delay and leaves no
|
|
11011
|
+
* animated value in the cascade once the entrance ends. Focus inside an
|
|
11012
|
+
* element with in-view.js finishes its entrance there, because a :focus-within
|
|
11013
|
+
* override lapses on blur: the entrance resumes from its timeline. `.reveal`
|
|
11014
|
+
* alone has no such guard while its first-render entrance runs.
|
|
10828
11015
|
*
|
|
10829
11016
|
* Public hooks:
|
|
10830
11017
|
* --reveal-duration
|
|
10831
11018
|
* --reveal-distance
|
|
10832
11019
|
* --reveal-stagger
|
|
11020
|
+
* --reveal-delay
|
|
10833
11021
|
*/
|
|
10834
11022
|
.reveal,
|
|
10835
11023
|
.reveal-group {
|
|
10836
11024
|
--reveal-duration: 450ms;
|
|
10837
11025
|
--reveal-distance: 1rem;
|
|
10838
11026
|
--reveal-stagger: 60ms;
|
|
11027
|
+
--reveal-delay: 0ms;
|
|
10839
11028
|
}
|
|
10840
11029
|
|
|
10841
11030
|
@media screen and (prefers-reduced-motion: no-preference) {
|
|
@@ -10844,14 +11033,20 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
|
|
|
10844
11033
|
/* The gentler ease-out keeps the fade gradual; surface entrance timing
|
|
10845
11034
|
makes most of the content visible too early. */
|
|
10846
11035
|
animation: actual-reveal var(--reveal-duration) ease-out backwards;
|
|
11036
|
+
/* Also the group's delay when sibling-index() is unsupported. */
|
|
11037
|
+
animation-delay: var(--reveal-delay);
|
|
10847
11038
|
}
|
|
10848
11039
|
|
|
10849
11040
|
/* The cap keeps a long list from becoming an endless cascade: the ninth and
|
|
10850
11041
|
later items share the eighth step's delay. An engine without
|
|
10851
11042
|
sibling-index() drops this declaration alone and reveals the group
|
|
10852
|
-
together, which is the intended degradation. */
|
|
11043
|
+
together after the base delay, which is the intended degradation. */
|
|
10853
11044
|
.reveal-group > * {
|
|
10854
|
-
animation-delay: calc(
|
|
11045
|
+
animation-delay: calc(
|
|
11046
|
+
var(--reveal-delay) +
|
|
11047
|
+
min(sibling-index() - 1, 8) *
|
|
11048
|
+
var(--reveal-stagger)
|
|
11049
|
+
);
|
|
10855
11050
|
}
|
|
10856
11051
|
|
|
10857
11052
|
.reveal.is-pending,
|