API symbol headings emit h2 so the hierarchy descends sequentially, dark-mode code comments use sage to clear WCAG contrast over Dracula's background, and the navbar wordmark declares intrinsic dimensions.
- commit
- 01bc07eacf5f6e6d55e3e97da6a26fd2f78cfb28
- parent
- a26b81a716f74b62fdeec2e472de3583bd21cd3d
- author
- Dami <dami.etoile@gmail.com>
| M | tools/ | 3 | ++- |
| M | website/ | 4 | ++++ |
| M | website/ | 8 | ++++++++ |
@@ -388,7 +388,8 @@ const KIND_LABEL: Record<string, string> = {
388388 function renderSymbol(symbol: SymbolNode): string {389389 const out: string[] = [];390390 const kinds = [...new Set(symbol.declarations.map((dec) => KIND_LABEL[dec.kind] ?? dec.kind))];391- out.push(`### ${symbol.name}`);391+ // h2 keeps the heading hierarchy sequential under the page h1392+ out.push(`## ${symbol.name}`);392393 out.push(`<sup>${kinds.join(", ")}</sup>`);393394 const signatures = symbol.declarations394395 .map((dec) => declarationSignature(symbol.name, dec))@@ -172,6 +172,10 @@ const config: Config = {
172172 logo: {173173 alt: "lofi",174174 src: "img/lofi-wordmark.svg",175+ // intrinsic dimensions (800x360 viewBox at the navbar's 1.7rem height)176+ // so the image never contributes layout shift177+ width: 60,178+ height: 27,175179 },176180 items: [177181 { type: "docSidebar", sidebarId: "docs", position: "left", label: "Docs" },@@ -64,6 +64,14 @@
6464 color: #f3faf6;6565 }6666 67+/* Dracula's comment color fails WCAG contrast on its background; sage68+ clears 4.5:1. prism-react-renderer inlines token colors, so !important. */69+[data-theme="dark"] .theme-code-block .token.comment,70+[data-theme="dark"] .theme-code-block .token.prolog,71+[data-theme="dark"] .theme-code-block .token.cdata {72+ color: #8fae9f ;73+}74+6775 /* the footer wears the brand forest, like the navbar */6876 .footer--dark {6977 --ifm-footer-background-color: #18231f;