force heading colors with !important to beat Pico's cascade
The variable-based overrides (--pico-h1-color, --pico-color) weren't reliably winning against Pico's multi-layer cascade of theme selectors, prefers-color-scheme media queries, and variable indirection. Headings were rendering near-white (#f0f1f3) on dark-OS systems despite data-theme="light". Using !important on color is the pragmatic fix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -45,18 +45,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Headings — Deep Navy, Inter
|
/* Headings — Deep Navy, Inter
|
||||||
Specificity must match Pico's [data-theme=light] h1 (0,1,1)
|
Force heading colors with !important to beat Pico's multi-layer
|
||||||
to win over dark-mode heading colors on dark-OS systems. */
|
variable cascade (theme selectors + prefers-color-scheme media). */
|
||||||
[data-theme="light"] h1,
|
h1, h2, h3, h4, h5, h6 {
|
||||||
[data-theme="light"] h2,
|
color: #0F172A !important;
|
||||||
[data-theme="light"] h3,
|
|
||||||
[data-theme="light"] h4,
|
|
||||||
[data-theme="light"] h5,
|
|
||||||
[data-theme="light"] h6 {
|
|
||||||
--pico-color: #0F172A;
|
|
||||||
color: #0F172A;
|
|
||||||
font-family: 'Inter', system-ui, -apple-system, sans-serif;
|
font-family: 'Inter', system-ui, -apple-system, sans-serif;
|
||||||
}
|
}
|
||||||
|
h4, h5, h6 {
|
||||||
|
color: #1E293B !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* Data & metrics use monospace */
|
/* Data & metrics use monospace */
|
||||||
.metric, .mono, [data-mono] {
|
.metric, .mono, [data-mono] {
|
||||||
|
|||||||
Reference in New Issue
Block a user