Skip to content

Commit 3bca8c5

Browse files
committed
docs(fonts[css]): fix variable specificity — use body instead of :root
why: Furo sets --font-stack on body, which overrides :root via direct declaration. Our fonts.css loaded but never rendered. what: - Change CSS variable selector from :root to body in _generate_css() - Same specificity + later source order ensures our override wins
1 parent 4d6ef27 commit 3bca8c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/_ext/sphinx_fonts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def _generate_css(
8888
lines.append("")
8989

9090
if variables:
91-
lines.append(":root {")
91+
lines.append("body {")
9292
for var, value in variables.items():
9393
lines.append(f" {var}: {value};")
9494
lines.append("}")

0 commit comments

Comments
 (0)