Skip to content

Commit 08e12fe

Browse files
committed
🐛 fix(home): set --md-hue to unbreak MkDocs Material palette CSS chain
ROOT CAUSE: palette.*.min.css computes text colors using: --md-default-fg-color: hsla(var(--md-hue), 15%, 90%, 0.82) --md-typeset-color: var(--md-default-fg-color) When font: text: false is set in mkdocs.yml, MkDocs Material skips setting --md-hue. The CSS chain breaks: hsla(undefined, 15%, 90%, 0.82) fails silently, making all text invisible on any background color. FIX: explicitly set --md-hue: 266 in extra.css [data-md-color-scheme] selector, which loads AFTER palette.*.min.css, completing the chain. Why 5 previous attempts failed: we kept trying different --md-typeset-color values without realizing the variable chain ends at --md-hue.
1 parent d86d578 commit 08e12fe

2 files changed

Lines changed: 129 additions & 108 deletions

File tree

docs/overrides/main.html

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,64 @@
11
{% extends "base.html" %}
22

3+
{% block extrahead %}
4+
{{ super() }}
5+
<style>
6+
html, body, .md-typeset, .md-typeset p, .md-typeset li,
7+
.md-typeset td, .md-typeset th, .md-typeset h1, .md-typeset h2,
8+
.md-typeset h3, .md-typeset h4, .md-typeset h5, .md-typeset h6,
9+
.md-content, .md-content__inner, .md-main__inner,
10+
.md-nav__link, .md-nav__title, .md-tabs__link, .md-header__topic {
11+
color: #a0a0b8 !important;
12+
}
13+
.md-typeset h1, .md-typeset h2, .md-typeset h3,
14+
.md-typeset h4, .md-typeset h5, .md-typeset h6 {
15+
color: #ffffff !important;
16+
}
17+
.md-typeset a {
18+
color: #a78bfa !important;
19+
}
20+
.md-typeset code {
21+
color: #a78bfa !important;
22+
background: rgba(108, 92, 231, 0.12) !important;
23+
}
24+
.md-typeset strong {
25+
color: #ffffff !important;
26+
}
27+
.md-sidebar--primary .md-nav__link {
28+
color: #a0a0b8 !important;
29+
}
30+
</style>
31+
{% endblock %}
32+
33+
{% block scripts %}
34+
{{ super() }}
35+
<!-- Absolute last thing on the page — re-apply colors after MkDocs JS finishes -->
36+
<style>
37+
html, body, .md-typeset, .md-typeset p, .md-typeset li,
38+
.md-typeset td, .md-typeset th, .md-typeset h1, .md-typeset h2,
39+
.md-typeset h3, .md-typeset h4, .md-typeset h5, .md-typeset h6,
40+
.md-content, .md-content__inner, .md-main__inner,
41+
.md-nav__link, .md-nav__title, .md-tabs__link, .md-header__topic {
42+
color: #a0a0b8 !important;
43+
}
44+
.md-typeset h1, .md-typeset h2, .md-typeset h3,
45+
.md-typeset h4, .md-typeset h5, .md-typeset h6 {
46+
color: #ffffff !important;
47+
}
48+
.md-typeset a {
49+
color: #a78bfa !important;
50+
}
51+
.md-typeset code {
52+
color: #a78bfa !important;
53+
background: rgba(108, 92, 231, 0.12) !important;
54+
}
55+
.md-typeset strong {
56+
color: #ffffff !important;
57+
}
58+
</style>
59+
{% endblock %}
60+
361
{% block content %}
4-
<!-- Particle starfield canvas — only rendered, JS self-detects existence -->
562
<canvas id="particles-canvas" style="position:fixed;top:0;left:0;width:100%;height:100%;z-index:0;pointer-events:none;"></canvas>
663
{{ super() }}
764
{% include "partials/agent.html" %}

0 commit comments

Comments
 (0)