Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Scroll the documentation page as a single page

f784d769b5bf2409106a545951fc088a416503f6 · Keenan Nemetz · 21h ago · parent d1f44d83

Scroll the documentation page as a single page

The top bar was sticky and the sidebar and page outline were sticky
columns with their own scrollbar, so the docs read as three panes over a
scrolling article. Drop the sticky positioning and the per-column
overflow so the top bar, both side columns, and the article scroll
together, and shorten the anchor offset now that no bar covers the
top of the page. The small-screen sidebar stays a fixed drawer, since it
is an overlay rather than a column.

docs-theme/assets/docs.css +12−17

@@ -125,7 +125,9 @@
125 125
126 126 html {
127 127 scroll-behavior: smooth;
128 scroll-padding-top: calc(var(--topbar-h) + 24px);
128 /* The top bar scrolls away with the page, so an anchor only needs the
129 article's own breathing room, not the bar's height. */
130 scroll-padding-top: 24px;
129 131 }
130 132
131 133 body {
@@ -189,19 +191,17 @@ kbd {
189 191
190 192 /* ---------- top bar ---------- */
191 193
194 /* The bar is part of the document: it scrolls away with the page rather than
195 pinning itself over the article. */
192 196 .topbar {
193 position: sticky;
194 top: 0;
195 z-index: 20;
196 197 display: flex;
197 198 align-items: center;
198 199 gap: 20px;
199 200 height: var(--topbar-h);
200 201 padding-block: 0;
201 202 padding-inline: max(var(--page-gutter), calc((100% - var(--layout-max)) / 2 + var(--page-gutter)));
202 background: color-mix(in srgb, var(--bg-panel) 92%, transparent);
203 background: var(--bg-panel);
203 204 border-bottom: 1px solid var(--border);
204 backdrop-filter: blur(8px);
205 205 }
206 206
207 207 .brand {
@@ -351,11 +351,8 @@ kbd {
351 351
352 352 /* ---------- sidebar ---------- */
353 353
354 /* The side columns scroll with the article; no column has its own scrollbar. */
354 355 .sidebar {
355 position: sticky;
356 top: calc(var(--topbar-h) + 24px);
357 max-height: calc(100vh - var(--topbar-h) - 48px);
358 overflow-y: auto;
359 356 padding-right: 4px;
360 357 }
361 358
@@ -682,10 +679,6 @@ h6:hover .headerlink,
682 679 /* ---------- on this page ---------- */
683 680
684 681 .toc {
685 position: sticky;
686 top: calc(var(--topbar-h) + 24px);
687 max-height: calc(100vh - var(--topbar-h) - 48px);
688 overflow-y: auto;
689 682 font-size: calc(12.65px * 1);
690 683 }
691 684 .toc-title {
@@ -846,14 +839,16 @@ h6:hover .headerlink,
846 839 }
847 840 .content { max-width: var(--content-max); }
848 841
842 /* On small screens the sidebar is a drawer over the page, not a column in
843 it, so it is the one thing that stays put while open. */
849 844 .sidebar {
850 845 position: fixed;
851 top: var(--topbar-h);
846 top: 0;
852 847 bottom: 0;
853 848 left: 0;
854 849 z-index: 30;
855 850 width: min(20rem, 85vw);
856 max-height: none;
851 overflow-y: auto;
857 852 padding: 16px 14px 32px;
858 853 background: var(--bg-panel);
859 854 border-right: 1px solid var(--border);
@@ -865,7 +860,7 @@ h6:hover .headerlink,
865 860
866 861 .nav-scrim {
867 862 position: fixed;
868 inset: var(--topbar-h) 0 0;
863 inset: 0;
869 864 z-index: 25;
870 865 background: rgba(0, 0, 0, 0.5);
871 866 }