Skip to content

Commit d86d578

Browse files
committed
🐛 fix(home): add !important + direct .md-typeset fallback to force text visibility
Previous attempts used :root / [data-md-color-scheme] selectors without !important, but MkDocs Material's internal CSS variable resolution chain (built into the 200KB+ main bundle) resolves --md-typeset-color after our extra.css loads, overriding all previous values. This fix adds: 1. !important on all --md-* color variables 2. Direct .md-typeset { color: #a0a0b8 !important } as element-level fallback bypassing the entire CSS variable resolution chain
1 parent f63c795 commit d86d578

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

docs/stylesheets/extra.css

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,20 @@
3838
}
3939

4040
/* ── Fix #5: CRITICAL — text must be visible on dark background ──── */
41-
/* MkDocs Material uses [data-md-color-scheme] selectors with higher
42-
specificity than :root. Must match their selector chain. */
41+
/* MkDocs Material resolves --md-typeset-color from its internal chain
42+
which overrides our :root settings. Use !important on the exact
43+
selectors MkDocs uses, plus a direct .md-typeset color fallback. */
4344
[data-md-color-scheme="default"],
4445
[data-md-color-scheme="slate"] {
45-
--md-typeset-color: #a0a0b8;
46-
--md-typeset-a-color: #a78bfa;
47-
--md-default-fg-color--light: #6b6b80;
46+
--md-default-fg-color: #a0a0b8 !important;
47+
--md-typeset-color: #a0a0b8 !important;
48+
--md-typeset-a-color: #a78bfa !important;
49+
--md-default-fg-color--light: #6b6b80 !important;
50+
}
51+
52+
/* Direct element-level fallback — resolves variable resolution chain issues */
53+
.md-typeset {
54+
color: #a0a0b8 !important;
4855
}
4956

5057
/* ── Body Background ────────────────────────────────────────────── */

0 commit comments

Comments
 (0)