Skip to content

Commit 3981cc3

Browse files
committed
docs: fix the header logo fill and align theme font weights
The logo SVG carried fill="none" only on the root element; Material's .md-logo svg { fill: currentcolor } rule overrides a root presentation attribute, so the three open stroke paths rendered as a solid filled shape. Declaring fill="none" on each path wins over the inherited CSS value. Font weights move from 600 to 700: the theme's Google Fonts request only loads Inter at 300/400/700, so 600 was already substituting the 700 face with the webfont while rendering a lighter true-600 on the system fallback stack. The ltr/rtl rule pairs collapse into margin-inline-start and border-inline-start, which tie Material's physical outdent at equal specificity and win on source order. Cap mkdocs-material below 10: extra.css deliberately overrides theme-internal nav selectors, so a major bump should revisit it.
1 parent 5733216 commit 3981cc3

4 files changed

Lines changed: 24 additions & 24 deletions

File tree

docs/.overrides/.icons/mcp.svg

Lines changed: 1 addition & 1 deletion
Loading

docs/extra.css

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,20 @@
1616
}
1717

1818
/* Indent section children and hang a guide line. Material outdents section
19-
children with margin-left: -0.6rem, which is why they sit flush under the
20-
header; restoring the margin re-exposes the stock 0.6rem list padding. */
21-
[dir="ltr"] .md-sidebar--primary .md-nav__item--section > .md-nav {
22-
margin-left: 0.1rem;
23-
border-left: 0.05rem solid var(--md-default-fg-color--lightest);
24-
}
25-
[dir="rtl"] .md-sidebar--primary .md-nav__item--section > .md-nav {
26-
margin-right: 0.1rem;
27-
border-right: 0.05rem solid var(--md-default-fg-color--lightest);
19+
children with [dir=ltr] ... margin-left: -0.6rem, which is why they sit
20+
flush under the header; restoring the margin re-exposes the stock 0.6rem
21+
list padding. The logical property ties Material's physical one at
22+
(0,3,0) specificity and wins on source order (extra_css loads last),
23+
while staying direction-agnostic. */
24+
.md-sidebar--primary .md-nav__item--section > .md-nav {
25+
margin-inline-start: 0.1rem;
26+
border-inline-start: 0.05rem solid var(--md-default-fg-color--lightest);
2827
}
2928

3029
/* Same guide line for collapsible groups inside the API Reference subtree
3130
(section items also carry --nested, so exclude them). */
32-
[dir="ltr"] .md-sidebar--primary
33-
.md-nav__item--nested:not(.md-nav__item--section) > .md-nav {
34-
border-left: 0.05rem solid var(--md-default-fg-color--lightest);
35-
}
36-
[dir="rtl"] .md-sidebar--primary
37-
.md-nav__item--nested:not(.md-nav__item--section) > .md-nav {
38-
border-right: 0.05rem solid var(--md-default-fg-color--lightest);
31+
.md-sidebar--primary .md-nav__item--nested:not(.md-nav__item--section) > .md-nav {
32+
border-inline-start: 0.05rem solid var(--md-default-fg-color--lightest);
3933
}
4034

4135
/* Tighten vertical rhythm (stock: 0.625em link margins, 1.25em sections).
@@ -51,9 +45,11 @@
5145
margin-top: 0;
5246
}
5347

54-
/* The current page stands out from its siblings. */
48+
/* The current page stands out from its siblings. 700 because Material only
49+
loads Inter at 300/400/700; a 600 would silently substitute the 700 face
50+
anyway, but render lighter on the system-font fallback stack. */
5551
.md-sidebar--primary .md-nav__link--active {
56-
font-weight: 600;
52+
font-weight: 700;
5753
}
5854

5955
/* The sidebar repeats the site name right above the homepage nav entry;
@@ -65,12 +61,14 @@
6561
}
6662

6763
/* Headings: Material's 300-weight light-gray defaults read washed out; use
68-
the full foreground color and a solid weight instead. */
64+
the full foreground color and a solid weight instead. 700, not 600: the
65+
Google Fonts request only carries Inter 300/400/700 (see the nav__link
66+
note above). */
6967
.md-typeset h1,
7068
.md-typeset h2 {
71-
font-weight: 600;
69+
font-weight: 700;
7270
color: var(--md-default-fg-color);
7371
}
7472
.md-typeset h3 {
75-
font-weight: 600;
73+
font-weight: 700;
7674
}

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ docs = [
8080
"mkdocs-gen-files>=0.5.0",
8181
"mkdocs-glightbox>=0.4.0",
8282
"mkdocs-literate-nav>=0.6.1",
83-
"mkdocs-material[imaging]>=9.7.0",
83+
# docs/extra.css overrides Material-internal nav selectors; revisit it on a
84+
# major bump before raising this cap.
85+
"mkdocs-material[imaging]>=9.7.0,<10",
8486
"mkdocstrings-python>=2.0.1",
8587
]
8688
codegen = ["datamodel-code-generator==0.57.0"]

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)