|
1 | | -/* Sidebar hierarchy + density for MkDocs Material 9.7.x. |
2 | | - All rules scoped to the desktop sidebar breakpoint (>= 76.25em), matching |
3 | | - Material's own scoping for navigation.sections, so the mobile drill-down |
4 | | - drawer keeps stock styling. Colors use Material tokens, so the light and |
5 | | - slate schemes both work without extra palette handling. */ |
| 1 | +/* Sidebar hierarchy + density for Zensical's UI (Material-compatible md-* |
| 2 | + DOM, but different stock spacing: nav links are 8px-radius pills with |
| 3 | + 7px 16px padding). All rules scoped to the desktop sidebar breakpoint |
| 4 | + (>= 76.25em) so the mobile drill-down drawer keeps stock styling. Colors |
| 5 | + use the md-* tokens, so the light and slate schemes both work without |
| 6 | + extra palette handling. */ |
6 | 7 |
|
7 | 8 | @media screen and (min-width: 76.25em) { |
8 | | - /* Section labels: smaller, uppercase, letter-spaced, muted. Covers both the |
9 | | - clickable index-page headers and the bare API Reference label. */ |
| 9 | + /* Section labels: smaller, uppercase, letter-spaced, muted, and flush |
| 10 | + with the guide line below them. The label is a container whose inner |
| 11 | + anchor carries the stock pill padding; zero both so the label text |
| 12 | + starts at the section's left edge. */ |
10 | 13 | .md-sidebar--primary .md-nav__item--section > .md-nav__link { |
| 14 | + margin-top: 0; |
| 15 | + margin-left: 0; |
| 16 | + padding-left: 0; |
11 | 17 | font-size: 0.62rem; |
12 | 18 | font-weight: 700; |
13 | 19 | text-transform: uppercase; |
14 | 20 | letter-spacing: 0.1em; |
15 | 21 | color: var(--md-default-fg-color--light); |
16 | 22 | } |
| 23 | + .md-sidebar--primary .md-nav__item--section > .md-nav__link > a { |
| 24 | + padding: 2px 0; |
| 25 | + } |
17 | 26 |
|
18 | | - /* Indent section children and hang a guide line. Material outdents section |
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. */ |
| 27 | + /* Indent section children slightly and hang a guide line. */ |
24 | 28 | .md-sidebar--primary .md-nav__item--section > .md-nav { |
25 | 29 | margin-inline-start: 0.1rem; |
26 | 30 | border-inline-start: 0.05rem solid var(--md-default-fg-color--lightest); |
|
32 | 36 | border-inline-start: 0.05rem solid var(--md-default-fg-color--lightest); |
33 | 37 | } |
34 | 38 |
|
35 | | - /* Tighten vertical rhythm (stock: 0.625em link margins, 1.25em sections). |
36 | | - The child combinator keeps this off anchors inside md-nav__container, |
37 | | - which carry their own margin-top: 0 stock rule. */ |
| 39 | + /* Tighten vertical rhythm: the stock pill rows (7px 16px padding plus |
| 40 | + 6.3px top margins) read too airy for a deep nav; keep the pill shape |
| 41 | + and active highlight, just denser. */ |
38 | 42 | .md-sidebar--primary .md-nav__item > .md-nav__link { |
39 | | - margin-top: 0.45em; |
| 43 | + padding: 4px 10px; |
| 44 | + margin-top: 2px; |
40 | 45 | } |
41 | 46 | .md-sidebar--primary .md-nav__item--section { |
42 | 47 | margin: 1em 0; |
43 | 48 | } |
44 | | - .md-sidebar--primary .md-nav__item--section > .md-nav__link { |
45 | | - margin-top: 0; |
46 | | - } |
47 | 49 |
|
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. */ |
| 50 | + /* The current page stands out from its siblings (on top of the stock |
| 51 | + pill highlight). 700 because only Inter 300/400/700 are loaded. */ |
51 | 52 | .md-sidebar--primary .md-nav__link--active { |
52 | 53 | font-weight: 700; |
53 | 54 | } |
|
60 | 61 | } |
61 | 62 | } |
62 | 63 |
|
63 | | -/* Headings: Material's 300-weight light-gray defaults read washed out; use |
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). */ |
| 64 | +/* Dark scheme: Zensical's slate canvas is near-black (hsla(225,15%,5%)), |
| 65 | + harsher than the Material slate this site shipped with; restore that |
| 66 | + blue-grey. Code blocks and other surfaces keep Zensical's own tokens. */ |
| 67 | +[data-md-color-scheme="slate"] { |
| 68 | + --md-default-bg-color: #1e2129; |
| 69 | +} |
| 70 | + |
| 71 | +/* Headings: the 300-weight light-gray defaults read washed out; use the |
| 72 | + full foreground color and a solid weight instead. 700, not 600: only |
| 73 | + Inter 300/400/700 are loaded (see the nav__link note above). */ |
67 | 74 | .md-typeset h1, |
68 | 75 | .md-typeset h2 { |
69 | 76 | font-weight: 700; |
|
0 commit comments