Skip to content

Commit 307f5ed

Browse files
committed
style(docs): split global vs content rail; 1rem baseline; sync nav + .content
- --ftn-global-rail-top: 1rem (nav + main row); remove 769px step - --ftn-content-rail-top: 0rem (optional .content-only extra for theme hacks) - Nav padding-top uses global; main > .content uses calc(global + content) - Rename --ftn-content-rail-hpad to --ftn-global-rail-hpad Made-with: Cursor
1 parent c6a6210 commit 307f5ed

1 file changed

Lines changed: 11 additions & 17 deletions

File tree

site/supplemental-ui/css/site-ftn-docs.css

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
--ftn-header-bar-border: #d8d8d8;
1919
--ftn-header-bar-hover: rgba(0, 0, 0, 0.07);
2020
--ftn-header-github-icon-filter: brightness(0) opacity(0.92);
21-
/* Three-column top line-up (nav | article + TOC share one value):
22-
- Left: padding-top on .nav-menu.ftn-nav-tree-only (nav is outside main).
23-
- Center + right: padding-top on main > .content (one box for both columns; not margin
24-
on the page header vs TOC h3 — that drifts). */
25-
--ftn-content-rail-top: 0.75rem;
26-
--ftn-content-rail-hpad: 0.75rem;
21+
/* Top rails (nav is outside main; .content is main > .content):
22+
- --ftn-global-rail-top: shared baseline (nav + main row).
23+
- --ftn-content-rail-top: optional *extra* top padding for .content only (0 = nav and .content
24+
stay aligned; theme hackers can offset the article/TOC without moving the left nav). */
25+
--ftn-global-rail-top: 1rem;
26+
--ftn-content-rail-top: 0rem;
27+
--ftn-global-rail-hpad: 0.75rem;
2728
}
2829

2930
html.dark-theme {
@@ -38,12 +39,6 @@ html.dark-theme {
3839
--ftn-header-github-icon-filter: none;
3940
}
4041

41-
@media screen and (min-width: 769px) {
42-
:root {
43-
--ftn-content-rail-top: 1.25rem;
44-
}
45-
}
46-
4742
html {
4843
font-family: var(--ftn-font);
4944
}
@@ -317,10 +312,9 @@ html.dark-theme .ftn-doc-mast {
317312
min-width: 0;
318313
}
319314

320-
/* Inset article + in-page TOC together (same flex row). Nav uses padding on .nav-menu; do not
321-
duplicate with margin on .ftn-page-header or TOC h3. */
315+
/* Inset article + in-page TOC. padding-top = global + optional content-only rail. */
322316
.ftn-article .content {
323-
padding-top: var(--ftn-content-rail-top);
317+
padding-top: calc(var(--ftn-global-rail-top) + var(--ftn-content-rail-top));
324318
box-sizing: border-box;
325319
}
326320

@@ -705,9 +699,9 @@ html.dark-theme .ftn-bc-menu-item a.is-current {
705699
pointer-events: none;
706700
}
707701

708-
/* ——— Nav rail: first line lines up with page title + Contents (see --ftn-content-rail-top) ——— */
702+
/* ——— Nav: same *global* top as main row; sides use --ftn-global-rail-hpad ——— */
709703
body.ftn-body .nav .nav-menu.ftn-nav-tree-only {
710-
padding: var(--ftn-content-rail-top) var(--ftn-content-rail-hpad) 0.5rem var(--ftn-content-rail-hpad);
704+
padding: var(--ftn-global-rail-top) var(--ftn-global-rail-hpad) 0.5rem var(--ftn-global-rail-hpad);
711705
box-sizing: border-box;
712706
}
713707

0 commit comments

Comments
 (0)