Skip to content

Commit 0d3ef49

Browse files
committed
docs: put the pill inset on the elements that paint it
Zensical paints nav hover/active pills on .md-nav__link[href] anchors and [for] labels, never on the .md-nav__container wrapper — which is where the previous commit put the padding, leaving container-type section labels with a pill hugging their text. Move the inset onto the paint elements (leaf links, bare labels, and a wrapper's inner anchor) and keep wrappers geometry-neutral like stock. The 10px inset also keeps the pill's corner radius (0.4rem) from crowding the glyphs.
1 parent c8449b7 commit 0d3ef49

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

docs/extra.css

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,23 @@
1111
.md-nav__link child of its item with the same 10px horizontal padding,
1212
so all text shares one column, and hover/active pills always paint
1313
10px of breathing room inside the scroll container (never clipped).
14-
Inner anchors inside .md-nav__container wrappers are zeroed; the row
15-
box owns the geometry. Vertical rhythm has a single knob: the nav
16-
list's flex gap (stock 0.2rem reads airy; 2px matches the density the
17-
site shipped with on Material, ~30px row pitch). */
14+
The padding lives on the elements Zensical paints hover/active pills
15+
on (.md-nav__link[href] anchors and [for] labels — leaf links, bare
16+
section labels, and the inner anchor of an .md-nav__container
17+
wrapper); wrappers stay geometry-neutral, as stock. The 10px inset
18+
also stays >= the 0.4rem pill radius, so the corner curve never
19+
crowds the text. Vertical rhythm has a single knob: the nav list's
20+
flex gap (stock 0.2rem reads airy; 2px matches the density the site
21+
shipped with on Material, ~30px row pitch). */
1822
.md-sidebar--primary .md-nav__list {
1923
gap: 2px;
2024
}
21-
.md-sidebar--primary .md-nav__item > .md-nav__link {
25+
.md-sidebar--primary .md-nav__item > .md-nav__link:not(.md-nav__container),
26+
.md-sidebar--primary .md-nav__container > .md-nav__link {
2227
padding: 3px 10px;
2328
margin: 0;
2429
}
25-
.md-sidebar--primary .md-nav__container > .md-nav__link {
30+
.md-sidebar--primary .md-nav__item > .md-nav__container {
2631
padding: 0;
2732
margin: 0;
2833
}

0 commit comments

Comments
 (0)