Theming
Customize app.css, choose a preset, and add custom CSS.
gittydocs themes are pure CSS. The default look lives in app.css, and themes are just CSS variable overrides. It follows a shadcn-style token setup, so tools like tweakcn work well for live edits and previews. You can pick a preset, add a CSS file, or fully eject for deeper changes.
Preset themes
These presets are bundled and ready to use:
default⚪ — neutral surfaces with soft blue accents.slate🪨 — cool blue-gray with crisp accents.sage🌿 — soft botanical greens and calm surfaces.ember🔥 — warm amber tones with a grounded feel.ocean🌊 — a teal-forward palette with deep blues.sand🏖️ — sunlit neutrals with gentle warmth.mono— crisp black and white with subtle gray borders.
Select one in gittydocs.jsonc:
// docs/gittydocs.jsonc
{
"theme": {
"preset": "ocean",
},
}Presets work with the existing light/dark toggle. The color palette is driven by CSS variables; the toggle just switches the light/dark class.
Monochrome neutral theme
Set theme.preset to mono for white surfaces in light mode and black surfaces in dark mode. Primary actions, links, and sidebar accents stay monochrome, with subtle gray borders and dark code blocks in both modes. Semantic alerts keep distinct blue, green, amber, and red colors for readability.
{
"theme": {
"preset": "mono",
},
}The preset uses the same CSS tokens and custom CSS override workflow as the other bundled themes.
Custom CSS file
Drop a theme.css file in the root of your docs folder. It gets copied to /static/theme.css and auto-loaded.
/* docs/theme.css */
:root[data-theme="slate"] {
--primary: oklch(0.62 0.2 200);
--accent: oklch(0.92 0.05 200);
}To use a different filename or path (relative to your docs folder), point to it in config:
// docs/gittydocs.jsonc
{
"theme": {
"preset": "slate",
"cssFile": "themes/my-theme.css",
},
}If you need full control (new layout, typography, or structure changes), eject and edit src/styles/app.css directly.
Navigation spacing
You can adjust sidebar spacing without changing the layout or ejecting. Add overrides to your custom CSS file:
:root {
--docs-nav-section-gap: 1.25rem;
--docs-nav-indent: 1rem;
}--docs-nav-section-gapCSS length
- Default
1.25rem
--docs-nav-indentCSS length
- Default
0.75rem
Top-level section headings are flush. Direct pages and subsection headings indent one step; pages beneath a subsection indent two steps. Section and subsection headings share the same typography. Rows have no extra gaps within a section or around subsections. --docs-nav-section-gap applies only between top-level sections, not between individual rows.
These are CSS lengths, not config fields. Omit the overrides to keep the default design. Footer links sit with the automatic llms.txt link as compact rows in a separate bottom group, above the version; version text aligns with the link labels rather than their icons. Configure those links with navFooter, not a CSS setting. For group structure, icons, and collapsible sections, see Navigation.
Reduced motion
Sidebar collapsible groups, Files folders, Accordion sections, and Type Table rows animate their expansion and collapse, including their disclosure chevrons. They respect the reader's prefers-reduced-motion: reduce setting by removing those animations while keeping the same open/close behavior and keyboard controls.
If you add motion in custom theme CSS, honor the same preference. For example, disable your custom transitions or animations inside an @media (prefers-reduced-motion: reduce) rule rather than forcing motion back onto the built-in disclosures.
Customize with tweakcn
The live preview script is included out of the box, so you can just open:
tweakcn.com/editor/theme?p=custom, then make it open http://localhost:3000 or the website you have.
Tweakcn outputs CSS variables. Paste them into docs/theme.css (or the file you configured), or drop them into app.css after ejecting. This keeps the live preview workflow while staying CSS-only.
