actual-css 0.19.4 → 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 +67 -0
- package/README.md +6 -6
- package/components.json +6 -3
- package/dist/actual.full.css +249 -50
- 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 +8 -8
- 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 -2
- package/docs/pages/forms/validation.md +16 -16
- package/docs/pages/foundations/theming.md +32 -2
- package/docs/pages/foundations/tokens.md +18 -16
- package/docs/pages/guides/coding-agents.md +18 -0
- package/docs/pages/guides/introduction.md +1 -1
- package/llms.txt +3 -3
- package/package.json +5 -5
- package/reserved-classes.json +1 -0
- package/skills/actual-css/SKILL.md +7 -0
- package/src/cli/actual-css.js +3 -3
- 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 -3
- 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 +24 -9
- package/tokens.json +1 -0
- package/docs/design-notes/accessibility-decisions.md +0 -63
- package/docs/design-notes/app-ui.md +0 -67
- package/docs/design-notes/architecture.md +0 -70
- package/docs/design-notes/browser-support.md +0 -239
- package/docs/design-notes/cascade-layer.md +0 -74
- package/docs/design-notes/column-layout.md +0 -260
- package/docs/design-notes/css-anchor.md +0 -87
- package/docs/design-notes/enhancement-contract.md +0 -193
- package/docs/design-notes/forced-colors.md +0 -123
- package/docs/design-notes/grid.md +0 -785
- package/docs/design-notes/motion-cost.md +0 -62
- package/docs/design-notes/naming.md +0 -71
- package/docs/design-notes/platform-alignment.md +0 -602
- package/docs/design-notes/popover-manual-poc.md +0 -328
- package/docs/design-notes/references.md +0 -336
- package/docs/design-notes/rich-text.md +0 -61
- package/docs/design-notes/spacing-units.md +0 -286
- package/docs/design-notes/steps.md +0 -776
- package/docs/design-notes/surface-reparenting.md +0 -130
- package/docs/design-notes/tokens.md +0 -166
- package/docs/design-notes/tooltip-coordinate-space.md +0 -130
- package/docs/design-notes/widget-primitives.md +0 -144
- package/docs/navigation.json +0 -176
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,8 +3232,16 @@ mark {
|
|
|
3202
3232
|
}
|
|
3203
3233
|
|
|
3204
3234
|
.switch {
|
|
3205
|
-
|
|
3206
|
-
|
|
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);
|
|
3207
3245
|
--switch-border: var(--switch-bg);
|
|
3208
3246
|
--switch-knob: var(--surface-raised);
|
|
3209
3247
|
--switch-block-size: calc(var(--choice-control-size) + 0.125em);
|
|
@@ -3246,6 +3284,21 @@ mark {
|
|
|
3246
3284
|
cursor: pointer;
|
|
3247
3285
|
}
|
|
3248
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
|
+
|
|
3249
3302
|
/* No elevation on the knob: --shadow is a surface elevation (card, modal,
|
|
3250
3303
|
drawer, fab), and at this size its 12px blur reads as a smudge that spills
|
|
3251
3304
|
past the rail while carrying no state. The range thumb — the same kind of
|
|
@@ -3275,12 +3328,13 @@ mark {
|
|
|
3275
3328
|
than substituting an unsupported mix into both background and border. */
|
|
3276
3329
|
@supports (color: color-mix(in oklab, black, white)) {
|
|
3277
3330
|
.switch:not(:checked):hover:not(:disabled) {
|
|
3278
|
-
--switch-bg: color-mix(in oklab, var(--text)
|
|
3331
|
+
--switch-bg: color-mix(in oklab, var(--text) 15%, var(--border-control));
|
|
3279
3332
|
}
|
|
3280
3333
|
}
|
|
3281
3334
|
|
|
3282
3335
|
.switch:checked {
|
|
3283
3336
|
--switch-bg: var(--intent, var(--state-selected));
|
|
3337
|
+
--switch-border: var(--switch-bg);
|
|
3284
3338
|
--switch-knob: var(--intent-fg, var(--state-selected-fg));
|
|
3285
3339
|
}
|
|
3286
3340
|
|
|
@@ -3309,8 +3363,13 @@ mark {
|
|
|
3309
3363
|
outline-offset: var(--focus-outline-offset);
|
|
3310
3364
|
}
|
|
3311
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. */
|
|
3312
3370
|
.switch:disabled {
|
|
3313
3371
|
--switch-bg: var(--surface-subtle);
|
|
3372
|
+
--switch-border: var(--border);
|
|
3314
3373
|
--switch-knob: var(--state-disabled);
|
|
3315
3374
|
opacity: 1;
|
|
3316
3375
|
cursor: not-allowed;
|
|
@@ -4391,7 +4450,6 @@ mark {
|
|
|
4391
4450
|
}
|
|
4392
4451
|
|
|
4393
4452
|
.btn {
|
|
4394
|
-
--btn-font-size: var(--control-font-size);
|
|
4395
4453
|
--btn-min-size: var(--control-size);
|
|
4396
4454
|
--btn-pad-x: var(--control-pad-x, 1em);
|
|
4397
4455
|
--btn-bg: var(--ui-bg, var(--btn-default-bg, var(--intent, var(--neutral))));
|
|
@@ -4435,9 +4493,16 @@ mark {
|
|
|
4435
4493
|
use 0 0 #0000 to remove elevation, since none invalidates that list. */
|
|
4436
4494
|
box-shadow: var(--btn-shadow, 0 0 #0000);
|
|
4437
4495
|
font: inherit;
|
|
4438
|
-
|
|
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. */
|
|
4439
4502
|
font-weight: var(--font-weight-medium);
|
|
4440
|
-
|
|
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;
|
|
4441
4506
|
text-decoration: none;
|
|
4442
4507
|
cursor: pointer;
|
|
4443
4508
|
transition:
|
|
@@ -4455,6 +4520,9 @@ mark {
|
|
|
4455
4520
|
inline-size: var(--btn-min-size);
|
|
4456
4521
|
block-size: var(--btn-min-size);
|
|
4457
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);
|
|
4458
4526
|
}
|
|
4459
4527
|
|
|
4460
4528
|
/* .solid/.soft/.outline are shared via variants.css. The baseline --btn-*
|
|
@@ -4465,11 +4533,12 @@ mark {
|
|
|
4465
4533
|
--ui-border: transparent;
|
|
4466
4534
|
}
|
|
4467
4535
|
|
|
4468
|
-
/* A neutral outline is a quiet action
|
|
4469
|
-
|
|
4470
|
-
|
|
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. */
|
|
4471
4540
|
.btn.outline {
|
|
4472
|
-
--ui-border: var(--intent, var(--border
|
|
4541
|
+
--ui-border: var(--intent, var(--border));
|
|
4473
4542
|
}
|
|
4474
4543
|
|
|
4475
4544
|
/* A surface button is neutral chrome, so it hovers at the .outline rate: an
|
|
@@ -4560,6 +4629,9 @@ mark {
|
|
|
4560
4629
|
min-block-size: auto;
|
|
4561
4630
|
padding-inline: 0;
|
|
4562
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;
|
|
4563
4635
|
max-inline-size: 100%;
|
|
4564
4636
|
/* No border at all: a link reads through its underline, and the inherited
|
|
4565
4637
|
.btn border made transparent would turn into a visible box in forced
|
|
@@ -4777,10 +4849,11 @@ a.btn[aria-disabled="true"] {
|
|
|
4777
4849
|
|
|
4778
4850
|
.badge {
|
|
4779
4851
|
--badge-size: 1.5rem;
|
|
4780
|
-
/*
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
--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);
|
|
4784
4857
|
--badge-icon-size: 1em;
|
|
4785
4858
|
--badge-dot-size: 0.5rem;
|
|
4786
4859
|
/* A leading .avatar and a trailing .close are slots: a disc inside the pill
|
|
@@ -4836,7 +4909,7 @@ a.btn[aria-disabled="true"] {
|
|
|
4836
4909
|
|
|
4837
4910
|
.badge.lg {
|
|
4838
4911
|
--badge-size: 1.875rem;
|
|
4839
|
-
--badge-font-size: var(--font-size-
|
|
4912
|
+
--badge-font-size: var(--font-size-sm);
|
|
4840
4913
|
--badge-dot-size: 0.625rem;
|
|
4841
4914
|
}
|
|
4842
4915
|
|
|
@@ -5000,7 +5073,10 @@ a.badge[aria-disabled="true"] {
|
|
|
5000
5073
|
}
|
|
5001
5074
|
}
|
|
5002
5075
|
@media print {
|
|
5003
|
-
.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 {
|
|
5004
5080
|
border: var(--border-width) solid CanvasText;
|
|
5005
5081
|
}
|
|
5006
5082
|
}
|
|
@@ -9002,7 +9078,9 @@ a.avatar[aria-disabled="true"] {
|
|
|
9002
9078
|
*
|
|
9003
9079
|
* .navbar is a horizontal bar; .navbar-brand is the brand link; the inline
|
|
9004
9080
|
* links are a .cluster using .nav-link items. .nav-list is the vertical nav
|
|
9005
|
-
* 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.
|
|
9006
9084
|
*
|
|
9007
9085
|
* Public hooks:
|
|
9008
9086
|
* --nav-current-bg (fallback-only: current-link fill)
|
|
@@ -9013,6 +9091,7 @@ a.avatar[aria-disabled="true"] {
|
|
|
9013
9091
|
* Internal:
|
|
9014
9092
|
* --gap (local value for the shared gap token)
|
|
9015
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)
|
|
9016
9095
|
*/
|
|
9017
9096
|
/* Intent boundary — inherited intents do not tint this component.
|
|
9018
9097
|
Local intent classes still win because :where() has zero specificity.
|
|
@@ -9191,6 +9270,70 @@ a.avatar[aria-disabled="true"] {
|
|
|
9191
9270
|
border-inline-start: var(--border-width) solid var(--nav-list-rail-color, var(--border));
|
|
9192
9271
|
}
|
|
9193
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
|
+
|
|
9194
9337
|
/* Forced colors drops the fill and maps both inks to LinkText, so the current
|
|
9195
9338
|
link would be indistinguishable: it gets a shape instead. A vertical row
|
|
9196
9339
|
takes an inline-start trait, centered in the link's inline padding with
|
|
@@ -9220,6 +9363,21 @@ a.avatar[aria-disabled="true"] {
|
|
|
9220
9363
|
border-inline-start: 2px solid currentColor;
|
|
9221
9364
|
border-radius: var(--radius-full);
|
|
9222
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
|
+
}
|
|
9223
9381
|
}
|
|
9224
9382
|
|
|
9225
9383
|
/*
|
|
@@ -9366,7 +9524,9 @@ a.avatar[aria-disabled="true"] {
|
|
|
9366
9524
|
margin: 0;
|
|
9367
9525
|
padding: 0;
|
|
9368
9526
|
list-style: none;
|
|
9369
|
-
|
|
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);
|
|
9370
9530
|
|
|
9371
9531
|
/* Arrows, page numbers, and truncation ellipses share one geometric
|
|
9372
9532
|
system: equal digit widths keep the row from re-flowing as numbers grow
|
|
@@ -9750,7 +9910,8 @@ a.avatar[aria-disabled="true"] {
|
|
|
9750
9910
|
* --segmented-radius
|
|
9751
9911
|
* --segmented-fg
|
|
9752
9912
|
* --segmented-selected-bg
|
|
9753
|
-
* --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)
|
|
9754
9915
|
*
|
|
9755
9916
|
* Internal:
|
|
9756
9917
|
* --segment-min-size
|
|
@@ -9761,9 +9922,6 @@ a.avatar[aria-disabled="true"] {
|
|
|
9761
9922
|
--segmented-radius: var(--radius);
|
|
9762
9923
|
--segmented-fg: var(--text-muted);
|
|
9763
9924
|
--segmented-selected-bg: var(--surface-raised);
|
|
9764
|
-
/* The edge is what separates the selected segment where --surface-raised
|
|
9765
|
-
is darker than --surface-subtle (the default dark palette). */
|
|
9766
|
-
--segmented-selected-border: var(--border);
|
|
9767
9925
|
|
|
9768
9926
|
display: inline-grid;
|
|
9769
9927
|
grid-auto-flow: column;
|
|
@@ -9781,6 +9939,21 @@ a.avatar[aria-disabled="true"] {
|
|
|
9781
9939
|
vertical-align: middle;
|
|
9782
9940
|
}
|
|
9783
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
|
+
|
|
9784
9957
|
.segment {
|
|
9785
9958
|
position: relative;
|
|
9786
9959
|
display: flex;
|
|
@@ -9858,12 +10031,19 @@ a.avatar[aria-disabled="true"] {
|
|
|
9858
10031
|
}
|
|
9859
10032
|
|
|
9860
10033
|
/* Separate rules from the :has() forms below: an engine without :has() would
|
|
9861
|
-
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. */
|
|
9862
10042
|
.segment:is([aria-selected="true"], [aria-current="page"], [aria-current="true"]) {
|
|
9863
10043
|
background: var(--segmented-selected-bg);
|
|
9864
10044
|
color: var(--text);
|
|
9865
10045
|
box-shadow:
|
|
9866
|
-
0 0 0 var(--border-width) var(--segmented-selected-border),
|
|
10046
|
+
0 0 0 var(--border-width) var(--segmented-selected-border, transparent),
|
|
9867
10047
|
var(--shadow);
|
|
9868
10048
|
}
|
|
9869
10049
|
|
|
@@ -9871,7 +10051,7 @@ a.avatar[aria-disabled="true"] {
|
|
|
9871
10051
|
background: var(--segmented-selected-bg);
|
|
9872
10052
|
color: var(--text);
|
|
9873
10053
|
box-shadow:
|
|
9874
|
-
0 0 0 var(--border-width) var(--segmented-selected-border),
|
|
10054
|
+
0 0 0 var(--border-width) var(--segmented-selected-border, transparent),
|
|
9875
10055
|
var(--shadow);
|
|
9876
10056
|
}
|
|
9877
10057
|
|
|
@@ -10417,7 +10597,7 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
|
|
|
10417
10597
|
}
|
|
10418
10598
|
|
|
10419
10599
|
.join-addon {
|
|
10420
|
-
--control-border: var(--border-control);
|
|
10600
|
+
--control-border: var(--control-default-border, var(--border-control));
|
|
10421
10601
|
--control-bg: var(--surface-subtle);
|
|
10422
10602
|
--control-fg: var(--text-muted);
|
|
10423
10603
|
|
|
@@ -10528,9 +10708,19 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
|
|
|
10528
10708
|
|
|
10529
10709
|
/* Text controls paint their own inset focus outline (control.css), so a
|
|
10530
10710
|
.join never moves the ring to the group: button-only groups and wrapped
|
|
10531
|
-
inputs alike keep per-control focus, with no :has() group treatment.
|
|
10532
|
-
|
|
10533
|
-
|
|
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
|
+
}
|
|
10534
10724
|
|
|
10535
10725
|
/* Effects — purely visual enrichments. */
|
|
10536
10726
|
/*
|
|
@@ -10817,21 +11007,24 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
|
|
|
10817
11007
|
* lost its hover motion). The `animation` shorthand still replaces another
|
|
10818
11008
|
* animation on the same element, which is the remaining composition limit.
|
|
10819
11009
|
*
|
|
10820
|
-
* Fill mode `backwards` holds the first keyframe through a
|
|
10821
|
-
*
|
|
10822
|
-
* element
|
|
10823
|
-
*
|
|
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.
|
|
10824
11015
|
*
|
|
10825
11016
|
* Public hooks:
|
|
10826
11017
|
* --reveal-duration
|
|
10827
11018
|
* --reveal-distance
|
|
10828
11019
|
* --reveal-stagger
|
|
11020
|
+
* --reveal-delay
|
|
10829
11021
|
*/
|
|
10830
11022
|
.reveal,
|
|
10831
11023
|
.reveal-group {
|
|
10832
11024
|
--reveal-duration: 450ms;
|
|
10833
11025
|
--reveal-distance: 1rem;
|
|
10834
11026
|
--reveal-stagger: 60ms;
|
|
11027
|
+
--reveal-delay: 0ms;
|
|
10835
11028
|
}
|
|
10836
11029
|
|
|
10837
11030
|
@media screen and (prefers-reduced-motion: no-preference) {
|
|
@@ -10840,14 +11033,20 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
|
|
|
10840
11033
|
/* The gentler ease-out keeps the fade gradual; surface entrance timing
|
|
10841
11034
|
makes most of the content visible too early. */
|
|
10842
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);
|
|
10843
11038
|
}
|
|
10844
11039
|
|
|
10845
11040
|
/* The cap keeps a long list from becoming an endless cascade: the ninth and
|
|
10846
11041
|
later items share the eighth step's delay. An engine without
|
|
10847
11042
|
sibling-index() drops this declaration alone and reveals the group
|
|
10848
|
-
together, which is the intended degradation. */
|
|
11043
|
+
together after the base delay, which is the intended degradation. */
|
|
10849
11044
|
.reveal-group > * {
|
|
10850
|
-
animation-delay: calc(
|
|
11045
|
+
animation-delay: calc(
|
|
11046
|
+
var(--reveal-delay) +
|
|
11047
|
+
min(sibling-index() - 1, 8) *
|
|
11048
|
+
var(--reveal-stagger)
|
|
11049
|
+
);
|
|
10851
11050
|
}
|
|
10852
11051
|
|
|
10853
11052
|
.reveal.is-pending,
|