swarm-ui: dimmed text on the light palette keeps enough of the text colour to pass AA contrast
This commit is contained in:
parent
72ffe3b187
commit
b82d4d4722
2 changed files with 19 additions and 2 deletions
|
|
@ -128,6 +128,9 @@
|
|||
--base0D: var(--latte-base0D);
|
||||
--base0E: var(--latte-base0E);
|
||||
--base0F: var(--latte-base0F);
|
||||
/* Dimmed text on the light palette: see `--muted-share` in theme.css. */
|
||||
--muted-share: 85%;
|
||||
--subtext0-share: 93%;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -159,6 +162,9 @@
|
|||
--base0D: var(--latte-base0D);
|
||||
--base0E: var(--latte-base0E);
|
||||
--base0F: var(--latte-base0F);
|
||||
/* Dimmed text on the light palette: see `--muted-share` in theme.css. */
|
||||
--muted-share: 85%;
|
||||
--subtext0-share: 93%;
|
||||
}
|
||||
:root[data-theme="dark"] {
|
||||
--base00: var(--mocha-base00);
|
||||
|
|
|
|||
|
|
@ -36,14 +36,19 @@
|
|||
); /* terminal / code bg, below --bg */
|
||||
--muted: color-mix(
|
||||
in srgb,
|
||||
var(--base05) 55.5%,
|
||||
var(--base05) var(--muted-share, 55.5%),
|
||||
var(--base00)
|
||||
); /* secondary / dimmed text */
|
||||
--subtext0: color-mix(
|
||||
in srgb,
|
||||
var(--base05) 77.7%,
|
||||
var(--base05) var(--subtext0-share, 77.7%),
|
||||
var(--base00)
|
||||
); /* toolbar/status text; dimmer than --fg, lighter than --muted */
|
||||
/* `--muted-share` and `--subtext0-share` are how much of the text colour each
|
||||
mix keeps. A palette whose background is light sets them higher in
|
||||
`colors.css`: at the dark palette's 55.5% the light one's muted text was
|
||||
2.4:1 against its card background, short of the 4.5:1 AA asks for. A palette
|
||||
that sets neither keeps the shares above. */
|
||||
|
||||
/* `--muted`, above, is mixed toward `--base00`/`--bg` — correct for
|
||||
dimmed text on the page background, wrong for dimmed text sitting on
|
||||
|
|
|
|||
Loading…
Reference in a new issue