From dc2501b53995d6d548684ad0beea55b565bd0ff8 Mon Sep 17 00:00:00 2001 From: gl0w Date: Wed, 28 Oct 2026 11:41:11 +0000 Subject: [PATCH] increase code-page section spacing to 32px (#123) --- .../issue.md | 18 ++++++++++++++++++ static/style.css | 13 +++++++------ tests/code_cols.rs | 8 ++++---- 3 files changed, 29 insertions(+), 10 deletions(-) create mode 100644 .forge/issues/fecc8df9-a06e-4483-ba8c-788883199fa9/issue.md diff --git a/.forge/issues/fecc8df9-a06e-4483-ba8c-788883199fa9/issue.md b/.forge/issues/fecc8df9-a06e-4483-ba8c-788883199fa9/issue.md new file mode 100644 index 0000000..a8a8862 --- /dev/null +++ b/.forge/issues/fecc8df9-a06e-4483-ba8c-788883199fa9/issue.md @@ -0,0 +1,18 @@ +--- +id: fecc8df9-a06e-4483-ba8c-788883199fa9 +title: Increase code-page section spacing to 32px +state: open +labels: +- area:render +assignees: [] +milestone: null +created: 2026-10-28T11:39:44.666458802Z +updated: null +--- +## Problem + +The #122 vertical rhythm is consistent, but 24px between major blocks now reads slightly tight on the code page. + +## Fix + +Bump only the major-block gap from `--s5` (24px) to `--s6` (32px), keeping it identical for every transition: navbar → repo header, repo header → Files, Files table → Languages, and Languages → README. Keep 12px heading→content and 8px bar→legend unchanged. diff --git a/static/style.css b/static/style.css index f40f831..4811183 100644 --- a/static/style.css +++ b/static/style.css @@ -138,7 +138,7 @@ td code,th code{word-break:break-all} td.title,td.sha{overflow-wrap:anywhere} td.num{width:1%;white-space:nowrap} /* Single-column stack; children keep DOM order. */ -.cols{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s5);min-width:0} +.cols{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s6);min-width:0} .cols>section,.cols>div{min-width:0} /* Forms: full-width on mobile, >=40px touch targets. */ form{max-width:44rem;margin:1rem 0;min-width:0} @@ -285,15 +285,16 @@ details.clonebox:not([open]){padding-bottom:.25rem} .clonebox .clone-body{margin:0} .clonebox .clone-body>:first-child{margin-top:.75rem} .clone-hint,.clonebox summary .muted{font-weight:400} -/* Code page vertical rhythm (f0rge #122): one scale instead of browser - heading margins. 24px between major blocks, 12px heading -> content, - 8px language bar -> legend. Scoped so markdown body flow is unchanged. */ -.repo-head{margin-top:var(--s5);margin-bottom:var(--s5);gap:var(--s3)} +/* Code page vertical rhythm (f0rge #122/#123): one scale instead of + browser heading margins. 32px between major blocks, 12px heading -> + content, 8px language bar -> legend. Scoped so markdown body flow is + unchanged. */ +.repo-head{margin-top:var(--s6);margin-bottom:var(--s6);gap:var(--s3)} .repo-head h1{margin:0} .repo-head .clonebox{margin:0} .code-files>h2,.code-readme>h2{margin:0 0 var(--s3)} .code-files>.table-scroll{margin:0} -.langs{margin:var(--s5) 0 0} +.langs{margin:var(--s6) 0 0} .langs>h2{margin:0 0 var(--s3)} .lang-bar{margin:0} .lang-legend{margin:var(--s2) 0 0} diff --git a/tests/code_cols.rs b/tests/code_cols.rs index 03c620d..59f2c8c 100644 --- a/tests/code_cols.rs +++ b/tests/code_cols.rs @@ -148,15 +148,15 @@ fn code_tab_is_always_stacked() { fn code_page_uses_one_vertical_rhythm() { let css = css(); // f0rge #122: explicit code-page rhythm, not browser heading margins. - // 24px between major blocks, 12px heading -> content, 8px bar -> legend. + // 32px between major blocks, 12px heading -> content, 8px bar -> legend. for rule in [ - ".cols{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s5)", - ".repo-head{margin-top:var(--s5);margin-bottom:var(--s5);gap:var(--s3)}", + ".cols{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s6)", + ".repo-head{margin-top:var(--s6);margin-bottom:var(--s6);gap:var(--s3)}", ".repo-head h1{margin:0}", ".repo-head .clonebox{margin:0}", ".code-files>h2,.code-readme>h2{margin:0 0 var(--s3)}", ".code-files>.table-scroll{margin:0}", - ".langs{margin:var(--s5) 0 0}", + ".langs{margin:var(--s6) 0 0}", ".langs>h2{margin:0 0 var(--s3)}", ".lang-bar{margin:0}", ".lang-legend{margin:var(--s2) 0 0}", -- 2.56.0