/* ============================================================================
LAYER HANDOFFS
Everything below gives a property back to @layer makeover rather than
setting one. This file is in @layer components and the order statement puts
it after `makeover`, so every rule here wins over the design system whatever
the specificity -- including the bare `button`, `a` and `input` rules further
up, which carry no class and so reach every described component the site
renders. That is the whole reason this section exists: without it a described
act takes this file's chrome instead of the one makeover drew for it, and the
difference is invisible in the source of either file.
`revert-layer` is the deferral. It names no value, so the design system can
change what a chip looks like without this file learning about it.
Two rules govern how these are written, and both are load-bearing:
- Hand a property back on the arms makeover actually paints, not on the
plain class. Makeover gives a chip a colour only when it is disabled, so
`.chip { color: revert-layer }` would roll a live chip back past this
file's `button { color }` to the UA default rather than to anything
makeover chose.
- Outrank the rule being deferred past. Both rules are this file's and both
are in the same layer, so that contest is decided by specificity and then
by source order. `.field` does not beat `input[type="text"]`, which is
why the field handoffs are element-qualified, and this section sits at
the end of the file so an equal-specificity handoff still wins.
makeover-build's check_vocabulary reads both halves and fails the build on a
pair that has neither a handoff nor a reviewed exception, so this section
cannot fall behind the design system without somebody being told.
============================================================================ */
/* The surfaces a bare `button` was taking. `.card`, `.tab` and the two facet
controls are all rendered as buttons by the described screens. */
.card,
.tab,
.facet-take,
.facet-prune {
/* respec-ok: a layer handoff, not a value. */
background: revert-layer;
box-shadow: revert-layer;
}
.card:hover,
.tab:hover,
.facet-take:hover,
.facet-prune:hover {
/* respec-ok: a layer handoff, not a value. */
background: revert-layer;
}
.card:active,
.tab:active,
.facet-take:active,
.facet-prune:active {
/* respec-ok: a layer handoff, not a value. */
background: revert-layer;
box-shadow: revert-layer;
}
/* A facet control's colour is makeover's in every state: muted when disabled,
secondary when the value it names is not standing, inherited otherwise.
There is no arm of it this file has an opinion about. */
.facet-take,
.facet-prune {
/* respec-ok: a layer handoff, not a value. */
color: revert-layer;
}
/* The disabled arm. Makeover paints all four properties here -- muted text, the
not-allowed cursor, and the surface it keeps rather than dropping -- and this
file's `button:disabled` was taking every one of them. */
.button:disabled,
.button[aria-disabled="true"],
.card:disabled,
.card[aria-disabled="true"],
.chip:disabled,
.chip[aria-disabled="true"],
.tab:disabled,
.tab[aria-disabled="true"],
.segment:disabled,
.segment[aria-disabled="true"],
.toggle:disabled,
.toggle[aria-disabled="true"],
.field:disabled,
.field[aria-disabled="true"],
.facet-take:disabled,
.facet-take[aria-disabled="true"],
.facet-prune:disabled,
.facet-prune[aria-disabled="true"] {
/* respec-ok: a layer handoff, not a value. */
background: revert-layer;
box-shadow: revert-layer;
color: revert-layer;
cursor: revert-layer;
}
/* The focus ring. Makeover insets a field's so it does not collide with the
bevel and leaves every other one outside, and this file's `:focus-visible`
rules were flattening the distinction on every described control. */
.button:focus-visible,
.card:focus-visible,
.chip:focus-visible,
.link:focus-visible,
.tab:focus-visible,
.segment:focus-visible,
.toggle:focus-visible,
.facet-take:focus-visible,
.facet-prune:focus-visible {
/* respec-ok: a layer handoff, not a value. */
outline: revert-layer;
outline-offset: revert-layer;
}
/* A described field is an ``, a `