| 453 |
453 |
|
box-shadow: var(--shadow-inset);
|
| 454 |
454 |
|
}
|
| 455 |
455 |
|
|
|
456 |
+ |
/* A described act carries the generated `.button` class, and the element rule
|
|
457 |
+ |
above sets the same surface, bevel and tone the generated class does. This
|
|
458 |
+ |
file is in @layer components, which the order statement puts after
|
|
459 |
+ |
`makeover`, so the element rule wins whatever the specificity. Without the
|
|
460 |
+ |
handoff below a described act renders in --surface-overlay with
|
|
461 |
+ |
--shadow-raised and, worse, in --content rather than its tone: a
|
|
462 |
+ |
destructive act looks identical to an ordinary one. Same mechanism and same
|
|
463 |
+ |
remedy as `.tab.chosen` further down; read the comment there.
|
|
464 |
+ |
|
|
465 |
+ |
The split is deliberate. The app keeps padding, border and font from the
|
|
466 |
+ |
element rule, makeover keeps surface, bevel and tone. That is the
|
|
467 |
+ |
arrangement that already makes `.field` work, where the app's input rule
|
|
468 |
+ |
happens to set only geometry and typography.
|
|
469 |
+ |
|
|
470 |
+ |
Tone is handed back on `[data-tone]` rather than on `.button`, because an
|
|
471 |
+ |
untoned button has no colour in the layer to roll back to and would land on
|
|
472 |
+ |
the UA default instead of --content. */
|
|
473 |
+ |
.button {
|
|
474 |
+ |
/* respec-ok: a layer handoff, not a value. */
|
|
475 |
+ |
background: revert-layer;
|
|
476 |
+ |
box-shadow: revert-layer;
|
|
477 |
+ |
}
|
|
478 |
+ |
|
|
479 |
+ |
.button:hover {
|
|
480 |
+ |
/* respec-ok: a layer handoff, not a value. */
|
|
481 |
+ |
background: revert-layer;
|
|
482 |
+ |
}
|
|
483 |
+ |
|
|
484 |
+ |
.button:active {
|
|
485 |
+ |
/* respec-ok: a layer handoff, not a value. */
|
|
486 |
+ |
background: revert-layer;
|
|
487 |
+ |
box-shadow: revert-layer;
|
|
488 |
+ |
}
|
|
489 |
+ |
|
|
490 |
+ |
.button[data-tone] {
|
|
491 |
+ |
/* respec-ok: a layer handoff, not a value. */
|
|
492 |
+ |
color: revert-layer;
|
|
493 |
+ |
}
|
|
494 |
+ |
|
| 456 |
495 |
|
.btn-primary {
|
| 457 |
496 |
|
background: var(--primary-dark);
|
| 458 |
497 |
|
color: var(--primary-light);
|
| 819 |
858 |
|
for a git nav link; the tab has one.
|
| 820 |
859 |
|
|
| 821 |
860 |
|
The chosen arm's box-shadow comes back through the layer rather than being
|
| 822 |
|
- |
restated. `.tab` below zeroes the base `button` shadow, and this file is
|
| 823 |
|
- |
unlayered, so it outranks @layer makeover whatever the specificity: without
|
| 824 |
|
- |
the revert, the generated bevel never applies and a chosen tab reads flat.
|
|
861 |
+ |
restated. `.tab` below zeroes the base `button` shadow, and this file is in
|
|
862 |
+ |
@layer components, which the order statement puts after `makeover`, so it
|
|
863 |
+ |
outranks it whatever the specificity: without the revert, the generated
|
|
864 |
+ |
bevel never applies and a chosen tab reads flat.
|
| 825 |
865 |
|
`revert-layer` hands the property back instead of naming a value, which is
|
| 826 |
866 |
|
the difference between deferring to the design system and copying it. */
|
| 827 |
867 |
|
.tab.chosen {
|
| 1156 |
1196 |
|
/* Fill and depth come from layout.css, generated by makeover-webview: the card
|
| 1157 |
1197 |
|
is `--surface-raised` plus `--bevel-raised`, and `:hover` goes to
|
| 1158 |
1198 |
|
`--hover-surface` on a fine pointer only. Declaring either here would take
|
| 1159 |
|
- |
them back, since style.css is unlayered and unlayered beats the `makeover`
|
| 1160 |
|
- |
layer whatever the specificity. The box-shadow this used to carry was
|
|
1199 |
+ |
them back, since style.css is in @layer components, which the order
|
|
1200 |
+ |
statement puts after `makeover`, whatever the specificity. The box-shadow this used to carry was
|
| 1161 |
1201 |
|
`--shadow-card`, which already aliases `--bevel-raised`, so only the fill
|
| 1162 |
1202 |
|
actually moved: `--surface-overlay` to `--surface-raised`. Those are equal on
|
| 1163 |
1203 |
|
the platform default and a theme may set them apart. */
|
| 11614 |
11654 |
|
|
| 11615 |
11655 |
|
/* Only the corner. `display`, `width`, `height` and the raised fill and bevel
|
| 11616 |
11656 |
|
all come from makeover's own `.picture-img` rule, which layout.css puts on
|
| 11617 |
|
- |
every page through crate::shell::head. Restating any of them here is an
|
| 11618 |
|
- |
unlayered declaration quietly beating the design system, which is what the
|
|
11657 |
+ |
every page through crate::shell::head. Restating any of them here is a
|
|
11658 |
+ |
components-layer declaration quietly beating the design system, which is what the
|
| 11619 |
11659 |
|
drift check in build.rs exists to catch -- and did, on the first attempt at
|
| 11620 |
11660 |
|
this file. */
|
| 11621 |
11661 |
|
[data-widget="carousel"] .picture-img {
|
| 11643 |
11683 |
|
`box-shadow: 0 4px 10px var(--elevation), 0 14px 36px var(--elevation)`,
|
| 11644 |
11684 |
|
which is the defect `c0b63ea9` names: in-flow depth is a bevel and elevation
|
| 11645 |
11685 |
|
is for what sits *over* the page. It survived this long because it was
|
| 11646 |
|
- |
invisible -- an unlayered declaration on the same class makeover sets, so it
|
| 11647 |
|
- |
beat the design system's bevel silently. The drift check in build.rs found it
|
|
11686 |
+ |
invisible -- a declaration in a later layer on the same class makeover
|
|
11687 |
+ |
sets, so it beat the design system's bevel silently. The drift check in build.rs found it
|
| 11648 |
11688 |
|
the moment the frame became a described `.picture-img`.
|
| 11649 |
11689 |
|
|
| 11650 |
11690 |
|
So the frame is raised by makeover's bevel now, from `Depth::Raised`, and
|