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.

Rewrite documentation around reader tasks

d1f44d838966c0a4762073f12375ec7562582fdf · Keenan Nemetz · 21h ago · parent 9103f6a8

docs-theme/assets/docs.css +138−88

@@ -45,11 +45,13 @@
45 45 --topbar-h: 46px;
46 46 --sidebar-w: 16rem;
47 47 --toc-w: 14rem;
48 --content-max: 48rem;
49 --layout-gap: 40px;
48 /* The article is the flexible column: it takes the space the side columns
49 leave, up to this cap. */
50 --content-max: 56rem;
51 --layout-gap: 32px;
50 52 /* The docs grid, not the whole page, is the measure the header and footer
51 follow. Keeping the three columns plus their gutters in one token is what
52 makes the brand line up with the sidebar at every width. */
53 follow. Keeping the columns plus their gutters in one token is what makes
54 the brand line up with the sidebar at every width. */
53 55 --layout-max: calc(
54 56 var(--sidebar-w) + var(--content-max) + var(--toc-w) +
55 57 2 * var(--layout-gap) + 2 * var(--page-gutter)
@@ -57,7 +59,7 @@
57 59 --font: "Lexend", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Liberation Sans", Arial, sans-serif;
58 60 --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
59 61 --fs: 15.4px;
60 --lh: 1.55;
62 --lh: 1.62;
61 63
62 64 /* The head mark is drawn in the text colour, as on the forge's dark theme. */
63 65 --mark-fill: currentColor;
@@ -122,19 +124,12 @@
122 124 ::-webkit-scrollbar-track { background: transparent; }
123 125
124 126 html {
125 /* The shell owns the viewport: the bar, the pages' side columns, and the
126 article pane scroll on their own. A fragment jump widens the article pane,
127 so its scroll-padding keeps the heading clear of the bar. */
128 height: 100%;
127 scroll-behavior: smooth;
128 scroll-padding-top: calc(var(--topbar-h) + 24px);
129 129 }
130 130
131 131 body {
132 132 margin: 0;
133 /* Reserve the fixed bar's height, then never let the document scroll: the
134 shell below is exactly one viewport tall. */
135 padding-top: var(--topbar-h);
136 height: 100dvh;
137 overflow: hidden;
138 133 background: var(--bg);
139 134 color: var(--fg);
140 135 font-family: var(--font);
@@ -154,8 +149,8 @@ h1, h2, h3, h4, h5, h6 {
154 149 line-height: 1.35;
155 150 }
156 151
157 p { margin: 0 0 10px; }
158 ul, ol { margin: 0 0 10px; padding-left: 22px; }
152 p { margin: 0 0 14px; }
153 ul, ol { margin: 0 0 14px; padding-left: 22px; }
159 154 li > p { margin: 0; }
160 155 hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
161 156 img { max-width: 100%; }
@@ -195,12 +190,8 @@ kbd {
195 190 /* ---------- top bar ---------- */
196 191
197 192 .topbar {
198 /* Fixed rather than sticky: the bar never moves, whatever the page does
199 inside it, and it does not depend on no ancestor scrolling. */
200 position: fixed;
193 position: sticky;
201 194 top: 0;
202 left: 0;
203 right: 0;
204 195 z-index: 20;
205 196 display: flex;
206 197 align-items: center;
@@ -208,12 +199,9 @@ kbd {
208 199 height: var(--topbar-h);
209 200 padding-block: 0;
210 201 padding-inline: max(var(--page-gutter), calc((100% - var(--layout-max)) / 2 + var(--page-gutter)));
211 /* Opaque, and no backdrop-filter. A translucent fixed bar lets the page show
212 through as it scrolls underneath, and Firefox composites blurred backdrops
213 on fixed elements badly enough that the bar reads as moving. The bar keeps
214 its place, and the page stops leaking into it. */
215 background: var(--bg-panel);
202 background: color-mix(in srgb, var(--bg-panel) 92%, transparent);
216 203 border-bottom: 1px solid var(--border);
204 backdrop-filter: blur(8px);
217 205 }
218 206
219 207 .brand {
@@ -352,25 +340,23 @@ kbd {
352 340
353 341 .layout {
354 342 display: grid;
355 grid-template-columns: var(--sidebar-w) minmax(0, var(--content-max)) var(--toc-w);
343 grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
356 344 justify-content: center;
357 /* Full height, and every column scrolls itself. The bar and the columns keep
358 their place because nobody ever scrolls the document. */
359 align-items: stretch;
345 align-items: start;
360 346 gap: var(--layout-gap);
361 347 width: min(100%, var(--layout-max));
362 height: calc(100dvh - var(--topbar-h));
363 348 margin: 0 auto;
364 padding: 0 var(--page-gutter);
365 overflow: hidden;
349 padding: 28px var(--page-gutter) 80px;
366 350 }
367 351
368 352 /* ---------- sidebar ---------- */
369 353
370 354 .sidebar {
355 position: sticky;
356 top: calc(var(--topbar-h) + 24px);
357 max-height: calc(100vh - var(--topbar-h) - 48px);
371 358 overflow-y: auto;
372 overscroll-behavior: contain;
373 padding: 28px 4px 40px 0;
359 padding-right: 4px;
374 360 }
375 361
376 362 .nav-list { list-style: none; margin: 0; padding: 0; }
@@ -411,29 +397,117 @@ kbd {
411 397 .content {
412 398 min-width: 0;
413 399 max-width: var(--content-max);
414 overflow-y: auto;
415 overscroll-behavior: contain;
416 padding-block: 28px 0;
417 scroll-padding-top: 24px;
418 scroll-behavior: smooth;
419 400 }
420 401
421 402 .content > :first-child { margin-top: 0; }
422 403 .content > :last-child { margin-bottom: 0; }
423 404
424 .content h1 { margin: 0 0 14px; font-size: calc(22px * 1); }
425 .content h2 { margin: 32px 0 10px; font-size: calc(17.6px * 1); }
426 .content h3 { margin: 24px 0 8px; font-size: calc(15.4px * 1); }
427 .content h4 { margin: 20px 0 8px; font-size: calc(14.3px * 1); }
405 .content h1 { margin: 0 0 16px; font-size: calc(23.1px * 1); }
406 .content h2 { margin: 42px 0 12px; font-size: calc(17.6px * 1); }
407 .content h3 { margin: 30px 0 9px; font-size: calc(15.4px * 1); }
408 .content h4 { margin: 24px 0 8px; font-size: calc(14.3px * 1); }
428 409 .content h5,
429 410 .content h6 { margin: 18px 0 6px; color: var(--fg-muted); font-size: calc(13.75px * 1); }
430 411
431 .content p { margin: 10px 0; }
412 .content p { margin: 14px 0; }
432 413 .content ul,
433 .content ol { margin: 10px 0; padding-left: 24px; }
434 .content li { margin: 3px 0; }
414 .content ol { margin: 14px 0; padding-left: 24px; }
415 .content li { margin: 4px 0; }
435 416 .content li::marker { color: var(--fg-faint); }
436 417
418 /* Start-here cards on the overview. They are links, not navigation: the three
419 jobs a reader can arrive with. */
420 .start-grid {
421 display: grid;
422 grid-template-columns: repeat(3, minmax(0, 1fr));
423 gap: 12px;
424 margin: 20px 0 28px;
425 }
426 .start-card {
427 display: flex;
428 flex-direction: column;
429 gap: 5px;
430 padding: 15px 16px;
431 border: 1px solid var(--border);
432 border-radius: var(--radius-lg);
433 background: var(--bg-panel);
434 color: var(--fg);
435 }
436 .start-card:hover {
437 border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
438 background: var(--bg-raised);
439 text-decoration: none;
440 }
441 .start-card-title {
442 color: var(--accent);
443 font-size: calc(14.3px * 1);
444 font-weight: 600;
445 }
446 .start-card-text {
447 color: var(--fg-muted);
448 font-size: calc(13.2px * 1);
449 line-height: 1.5;
450 }
451
452 /* Callouts. Core Markdown's admonition extension emits .admonition.<type>.
453 Use them for a caveat at the point of decision, not for ordinary prose. */
454 .admonition {
455 margin: 18px 0;
456 padding: 12px 14px;
457 border: 1px solid var(--border);
458 border-left: 3px solid var(--running);
459 border-radius: var(--radius);
460 background: var(--bg-panel);
461 }
462 .admonition-title {
463 margin: 0 0 6px;
464 color: var(--running);
465 font-size: calc(13.75px * 1);
466 font-weight: 600;
467 }
468 .admonition > :last-child { margin-bottom: 0; }
469 .admonition.tip { border-left-color: var(--good); }
470 .admonition.tip .admonition-title { color: var(--good); }
471 .admonition.warning {
472 border-left-color: var(--warn);
473 background: color-mix(in srgb, var(--warn) 7%, var(--bg-panel));
474 }
475 .admonition.warning .admonition-title { color: var(--warn); }
476 .admonition.danger {
477 border-left-color: var(--bad);
478 background: color-mix(in srgb, var(--bad) 7%, var(--bg-panel));
479 }
480 .admonition.danger .admonition-title { color: var(--bad); }
481
482 /* Diagrams are Mermaid source, rendered in the browser on pages that opt in
483 with `mermaid: true`. Static images use the same figure frame. */
484 .doc-figure { margin: 22px 0; }
485 .doc-figure .mermaid {
486 margin: 0;
487 overflow-x: auto;
488 text-align: center;
489 }
490 .doc-figure .mermaid svg {
491 display: block;
492 max-width: 100%;
493 height: auto;
494 margin: 0 auto;
495 }
496 .doc-figure img {
497 display: block;
498 width: 100%;
499 height: auto;
500 border: 1px solid var(--border);
501 border-radius: var(--radius-lg);
502 background: var(--bg-panel);
503 }
504 .doc-figure figcaption {
505 margin-top: 8px;
506 color: var(--fg-faint);
507 font-size: calc(12.65px * 1);
508 line-height: 1.5;
509 }
510
437 511 .content blockquote {
438 512 margin: 14px 0;
439 513 padding: 2px 0 2px 14px;
@@ -467,7 +541,7 @@ h6:hover .headerlink,
467 541 width: 100%;
468 542 max-width: 100%;
469 543 overflow-x: auto;
470 margin: 16px 0;
544 margin: 20px 0;
471 545 border: 1px solid var(--border);
472 546 border-radius: var(--radius-lg);
473 547 border-collapse: collapse;
@@ -593,10 +667,9 @@ h6:hover .headerlink,
593 667 .pager-next .pager-title { color: var(--accent); }
594 668
595 669 .site-footer {
596 /* Inside the article pane now, so it scrolls with the text instead of
597 sitting in a band of its own below the shell. */
598 margin: 56px 0 0;
599 padding: 18px 0 48px;
670 width: min(100%, var(--layout-max));
671 margin: 0 auto;
672 padding: 18px var(--page-gutter) 40px;
600 673 border-top: 1px solid var(--border);
601 674 color: var(--fg-faint);
602 675 font-size: calc(12.65px * 1);
@@ -609,9 +682,10 @@ h6:hover .headerlink,
609 682 /* ---------- on this page ---------- */
610 683
611 684 .toc {
685 position: sticky;
686 top: calc(var(--topbar-h) + 24px);
687 max-height: calc(100vh - var(--topbar-h) - 48px);
612 688 overflow-y: auto;
613 overscroll-behavior: contain;
614 padding-block: 28px 40px;
615 689 font-size: calc(12.65px * 1);
616 690 }
617 691 .toc-title {
@@ -752,9 +826,11 @@ h6:hover .headerlink,
752 826
753 827 /* ---------- responsive ---------- */
754 828
755 @media (max-width: 1180px) {
829 /* Below the width where three columns plus a readable article fit, give the
830 article the TOC's space rather than squeezing it. */
831 @media (max-width: 1360px) {
756 832 .layout {
757 grid-template-columns: var(--sidebar-w) minmax(0, var(--content-max));
833 grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
758 834 justify-content: start;
759 835 }
760 836 .toc { display: none; }
@@ -762,16 +838,13 @@ h6:hover .headerlink,
762 838
763 839 @media (max-width: 900px) {
764 840 .nav-toggle { display: inline-flex; }
841 .start-grid { grid-template-columns: 1fr; }
765 842
766 843 .layout {
767 844 display: block;
768 padding-top: 0;
769 }
770 .content {
771 height: 100%;
772 max-width: var(--content-max);
773 padding-block: 20px 0;
845 padding-top: 20px;
774 846 }
847 .content { max-width: var(--content-max); }
775 848
776 849 .sidebar {
777 850 position: fixed;
@@ -780,6 +853,7 @@ h6:hover .headerlink,
780 853 left: 0;
781 854 z-index: 30;
782 855 width: min(20rem, 85vw);
856 max-height: none;
783 857 padding: 16px 14px 32px;
784 858 background: var(--bg-panel);
785 859 border-right: 1px solid var(--border);
@@ -810,38 +884,14 @@ h6:hover .headerlink,
810 884 .topbar-link .icon { display: none; }
811 885 .topbar-link { padding-inline: 2px; }
812 886 .layout { padding-inline: 16px; }
887 .site-footer { padding-inline: 16px; }
813 888 .content h1 { font-size: calc(20.9px * 1); }
814 889 .pager { grid-template-columns: 1fr; }
815 890 .palette-foot { display: none; }
816 891 }
817 892
818 /* The shell assumes a viewport. On paper there is none: undo the panes so a
819 long article prints whole instead of clipping to the visible scroll window. */
820 @media print {
821 html, body { height: auto; }
822 body { padding-top: 0; overflow: visible; }
823 .topbar,
824 .sidebar,
825 .toc,
826 .pager,
827 .nav-scrim { display: none; }
828 .layout {
829 display: block;
830 height: auto;
831 padding: 0;
832 overflow: visible;
833 }
834 .content {
835 height: auto;
836 max-width: none;
837 padding: 0;
838 overflow: visible;
839 scroll-behavior: auto;
840 }
841 }
842
843 893 @media (prefers-reduced-motion: reduce) {
844 .content { scroll-behavior: auto; }
894 html { scroll-behavior: auto; }
845 895 *,
846 896 *::before,
847 897 *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }