Styles
The theme ships its CSS under @staticbolt/docs/styles/. The project has one entry stylesheet that imports it and adds its own.
Entry
@import url("@staticbolt/docs/styles/docs.css");@import url("@staticbolt/docs/styles/katex.css");@import url("@styles/theme.css");@import url("@parts/social-icons/social-icons.style.css");| File | Content |
|---|---|
@staticbolt/docs/styles/docs.css | Everything: global.css, document.css, the Pagefind UI, and every part’s stylesheet. |
@staticbolt/docs/styles/global.css | Variables, resets, html and body. For pages that don’t use the document layout. |
@staticbolt/docs/styles/document.css | The docs layout grid and the markdown typography, tables, callouts, diagrams. |
@staticbolt/docs/styles/katex.css | KaTeX, only with math. |
The layout links the entry with bundle, so the whole tree becomes one file.
Colors
Two hues drive the palette, override them in theme.css:
:root { --sb-hue-accent: 290; --sb-hue-base: 290;}| Variable | Role |
|---|---|
--sb-hue-accent | Links, active states, highlights. |
--sb-hue-base | Tint of the grays and the background. |
Every color is light-dark(), so the scheme switch needs no extra rules. The grays and the accent derive from the hues through oklch(), any of them can be set directly:
| Variable | Role |
|---|---|
--sb-color-gray-0 to --sb-color-gray-7 | Text (0) to surfaces (7). |
--sb-color-black | Page background. |
--sb-color-accent, -high, -low | Accent and its two contrast steps. |
--sb-color-text, --sb-heading-color | Body and heading text. |
--sb-code-background, --sb-code-inline-background | Code blocks and inline code. |
--sb-note-*, --sb-tip-*, --sb-important-*, --sb-warning-*, --sb-caution-*, --sb-success-* | Callout background, border, text. |
Type and spacing
| Variable | Role |
|---|---|
--sb-md-font, --sb-font-mono | Font stacks. |
--sb-text-2xs to --sb-text-6xl | Size scale. |
--sb-text-h1 to --sb-text-h6 | Heading sizes, mapped onto the scale. |
--sb-line-height, --sb-line-height-headings | Line heights. |
--sb-content-gap-y | Vertical rhythm between blocks. |
--sb-header-height | Header height, the sidebar and table of contents offset by it. |
Components
sv-accordion reads --sv-gray-2, --sv-gray-5, --sv-gray-6, --sv-bdr-sz-sm, --sv-bdr-rad-md, and --sv-dir, all mapped from the theme in global.css. A site using more staticview components maps the rest in its theme.css:
:root { --sv-gray-0: var(--sb-color-gray-0); --sv-accent: var(--sb-color-accent);}Own styles
Project parts bring their own .style.css, import them after the theme in docs.css. A second entry for a page with a different layout, a landing page for instance, imports global.css and only the parts it uses:
@import url("@staticbolt/docs/styles/global.css");@import url("@staticbolt/docs/parts/color-scheme-switch/color-scheme-switch.style.css");@import url("@styles/theme.css");