mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fcaf15a0a4
Two custom properties in the shared-docs styles reference tokens that are
defined nowhere, so the declarations are invalid at computed-value time.
_kbd.scss sets the <kbd> text color with var(---tertiary-contrast); the extra
leading dash points at an undefined property with no fallback, so the color
resolves to the inherited value instead of the intended --tertiary-contrast.
_colors.scss builds --light-pink-to-light-purple-horizontal-gradient from
var(--light-purple), which is not defined anywhere (the sibling token is
--light-violet, defined in the same file), invalidating the gradient. The
gradient is not currently referenced, so this corrects a latent malformed
declaration rather than a visible bug.
Point both at the defined tokens: --tertiary-contrast and --light-violet.
(cherry picked from commit e70994bdc3)
33 lines
900 B
SCSS
33 lines
900 B
SCSS
@mixin kbd() {
|
|
// We only target non-nested kbd elements
|
|
kbd:not(:has(kbd)) {
|
|
position: relative;
|
|
color: var(--tertiary-contrast);
|
|
border: 1px solid var(--quinary-contrast);
|
|
box-shadow:
|
|
0 1px 0 rgba(0, 0, 0, 0.2),
|
|
0 0 0 2px var(--octonary-contrast) inset;
|
|
// NOTE: This line (in addition to others) prevents proper contrast checking in Lighthouse
|
|
text-shadow: 0 1px 0 var(--octonary-contrast);
|
|
border-radius: 3px;
|
|
display: inline-block;
|
|
font-family: sans-serif;
|
|
line-height: 1.5;
|
|
margin: 0 0.1em;
|
|
padding: 1px 0.4em;
|
|
min-width: 14px;
|
|
min-height: 20px;
|
|
vertical-align: middle;
|
|
text-align: center;
|
|
|
|
@media (prefers-reduced-motion: no-preference) {
|
|
*:hover > & {
|
|
box-shadow:
|
|
0 0.5px 0 rgba(0, 0, 0, 0.2),
|
|
0 0 0 2px var(--octonary-contrast) inset;
|
|
top: 1px;
|
|
}
|
|
}
|
|
}
|
|
}
|