CSS Custom Properties Reference

v1.0

All design tokens are defined in doku/assets/css/main.css. Override any of these in a child theme to customize the appearance without modifying theme files.

Color tokens

PropertyPurpose
--color-bgPage background
--color-bg-secondaryChrome and floating panels — the header, sidebar, TOC column, menu dropdowns and search results
--color-bg-codeCode block background
--color-textPrimary text
--color-text-mutedSecondary text, the quieter of the two — sidebar and table-of-contents rows, bylines and dates, code-block chrome, the colophon
--color-text-codeCode text
--color-text-headingHeading text
--color-borderStandard borders
--color-border-subtleSubtle / de-emphasized borders
--color-accentLinks, active states, interactive elements
--color-accent-hoverHover state for accent elements
--color-mega-row-hoverRow highlight inside a mega menu panel
--color-linkBody link color
--color-on-accentText that sits on the accent — the skip link, the Button block, the comment submit

Two rules worth keeping when you override a color

  • --color-bg-secondary has to stay on the same side of --color-bg as the shipped value — darker than the page in light mode, lighter in dark. The panels painted with it cast a shadow, and a surface on the wrong side of the page reads as sunk into it while its shadow says it is floating.
  • --color-text-dim is the stronger of the two secondary grays, and --color-text-muted the quieter. “Stronger” means further from the page: darker in light mode, lighter in dark. Keep them that way round, or a section label ends up reading as quieter than the rows beneath it.

Callout colors

PropertyCallout variant
--color-noteNote (a tint of your accent; follows the accent pickers)
--color-tipTip (green)
--color-warningWarning (amber)
--color-dangerDanger (red)
--color-infoInfo (indigo)

UI elements

PropertyPurpose
--color-text-dimSecondary text, the stronger of the two — header menu links, a card’s description, a post excerpt, a code block’s filename, a rail’s section label, keyboard keys
--color-kbd-bgKeyboard key background (the bare <kbd> element)
--color-kbd-borderKeyboard key border and its bottom shadow
--color-mark-bgBackground of a bare <mark>, such as one brought in by the Markdown importer. Text highlighted with WordPress’s own Highlight format keeps the colors you picked
--color-vote-idleA thumb in the helpfulness widget that the reader has not chosen
--color-param-typeThe Type column in an API parameter table
--color-diff-addAdded-line marker in a diff code block
--color-diff-add-bgAdded-line background tint
--color-diff-delRemoved-line marker in a diff code block
--color-diff-del-bgRemoved-line background tint

Note: Keyboard keys are styled on the bare kbd element, so overriding --color-kbd-bg and --color-kbd-border restyles both keys you insert with the Keyboard input format and any <kbd> brought in by the Markdown importer.

Typography

PropertyValue
--font-sansDM Sans, system-ui fallback. Interface text and body copy
--font-monoDM Mono, monospace fallback. Code blocks, inline code and keyboard keys — and article headings, h1 through h6, and the site title

Type scale

Interface text runs on a six-step scale in pixels, so it stays put relative to the chrome around it. Article text runs on rem, so it follows the reader’s own base size.

PropertyDefaultApplies to
--text-2xs10pxUppercase micro labels — the rail headings, the prev/next labels, mega menu column titles
--text-xs11pxChips and dense controls — badges, the theme toggle, the version switcher, deeper TOC levels
--text-sm12pxSecondary rows — the first TOC level, descriptions, metadata, the code language label
--text-base13pxThe interface default — header links, sidebar rows, form labels, card titles
--text-md14pxComfortable reading chrome — accordion summaries, comments, search results, tables
--text-lg15pxThe site name in the header
--text-code13.5pxCode blocks. Half a pixel above --text-base on purpose: a monospaced face reads smaller than a sans one at the same nominal size
--text-body.9375remArticle body copy, list items and quotes
--text-h1 … --text-h62rem 1.375rem 1.125rem 1rem .9375rem .875remThe heading scale. Each level is a visible step from the next, which matters on a documentation page because readers scan by heading level to find a section

Corner radii

PropertyDefaultApplies to
--radius-sm4pxSmall elements that sit inside a line of text — keyboard keys, inline code, badges, code sample tabs
--radius-md6pxEvery interactive control and small panel — buttons, the search field, the version dropdown, form fields, pagination links, callouts, blockquotes, accordions, and both navigation rails’ rows
--radius-lg8pxElements that occupy a block of their own — code blocks, cards, previous/next pagers, the search results panel

Three tokens cover the whole theme, so you can square everything off or round it right up in one place:

css
/* Sharper, more technical chrome */
:root {
    --radius-sm: 0;
    --radius-md: 2px;
    --radius-lg: 3px;
}

Note: Unlike the color tokens, these do not need a [data-theme="dark"] counterpart — they are the same in both modes, so setting them once in :root is enough.

Panel shadows

PropertyApplies to
--shadow-panelMenu dropdowns and the open version switcher
--shadow-overlayThe search results panel
--shadow-drawerThe navigation drawer, which slides in from the side — its offset is horizontal rather than downward

These do need a [data-theme="dark"] counterpart, and they are the one place where dark mode needs more of something than light rather than less: a black shadow falling on a near-black page has very little room to show itself, so the dark values are both heavier and wider. If you override them, expect to set the dark ones several times stronger than looks reasonable on paper. Past a point the shadow stops helping and the panel’s border does the remaining work — raising the opacity further mostly reads as a smudge.

Widths and gutters

PropertyDefaultApplies to
--width-article760pxThe article column on documentation pages, posts and search results. Between 901px and 1100px, where the left column is a drawer, the article also fills the room that column leaves. Normally you would set this with the Content width control under Layout rather than by hand. Everything else is measured from it
--width-content--width-article + --width-sidebar + --width-railThe frame around the whole page — the header bar, the two side columns and the article together. Derived rather than chosen, which is what keeps the article meeting the table of contents exactly at any width. Set it by hand and that guarantee goes with it
--width-nav--width-content + 2 × --gutter-barHow wide the header bar may run, its left and right margin included. The default matches the frame, so the bar’s contents meet the outer edges of the two side columns. Normally you would set this with the Header width control under Header rather than by hand; that control writes none here for a full-width bar
--width-sidebar280pxWidth of the left column: the documentation sidebar, the blog’s category list or a page’s Page Left Column widgets. One token drives the column reserved for it on desktop, the column itself, and the navigation drawer on smaller screens, so the three can never disagree. The article area absorbs whatever you add. A page with the left column off widens its article by 280px; that figure does not follow this token
--width-rail220pxWidth of the right column, whatever it holds: the “On this page” contents, a listing page’s browse sections or the Blog Sidebar or Page Right Column widgets, the same way. A page with the right column off widens its article by 220px; that figure does not follow this token
--width-version-max160pxWidest the version switcher may grow, in the header and in the navigation drawer alike. The button sizes to the version name; this only caps it, and a longer name ellipsizes. Raise it if your version names are long words rather than numbers — in the header the extra width comes out of the search field
--gutter-bar24px (16px below 560px)The left and right margin of the header bar, of the navigation drawer and its menus, and of the “On this page” column on the right — so all of them move together when you change it. It is also the least space left between the window edge and either side column on a window narrower than the frame. One token because the drawer’s close button replaces the header’s menu button in place, and because it is what puts that button and every menu label on the same column. The menu rows themselves start 8px further out, so a row’s hover highlight sits behind its label rather than beside it
--space-block20pxThe vertical space between two blocks in an article — code blocks, callouts, quotes, tables, step lists, tabbed samples, card grids, diagrams and the core blocks alike. Raise it for an airier article, lower it for a denser one, and the whole page keeps its rhythm. Three things opt out on purpose: two paragraphs or lists sit 16px apart as running text, a heading sits its own distance above what it introduces, and a horizontal rule sits further apart because it marks a section break. Widget areas set their own 12px, the gap between their paragraphs, so this token does not reach them

Like the radii, these are the same in both color schemes and need no [data-theme="dark"] counterpart.

Both side columns hold their position for the whole article rather than sliding away with the last screenful. They shorten instead as the full-width footer comes into view, so each one stops where the footer starts and neither is ever covered by it. Doku positions the columns against the window and works out the offset that keeps them aligned with your content from --width-content and --gutter-bar, in a token called --rail-gutter. It is derived — change the widths above and it follows; set it by hand and the columns land off their tracks.

This applies to both side columns on every page, widget columns included.

Motion

PropertyDefaultApplies to
--duration-quick.12sA control answering the pointer — a hover, a focus ring, a link changing color
--duration-panel.25sSomething arriving or leaving — the navigation drawer, a collapsing section, the overlay behind the drawer, a chevron turning

Two values, because the theme only makes two kinds of move. Lower them both for a snappier interface, raise them for a softer one, and everything stays in step.

Readers who have asked their system to reduce motion get none of it: the drawer, the collapsing sections, the chevrons and the search field’s focus animation all become instant, and jumping to a heading from the table of contents stops scrolling the page smoothly and simply arrives. Color and background fades are left alone — nothing about them moves.

PropertyDefaultApplies to
--nav-row-leading1.4Line height of every row in the documentation sidebar and the table of contents
--nav-row-pad8pxThe padding above and below each of those rows. Set it and the row leading together — see below

A navigation row takes its vertical space from padding alone — there is no fixed row height. A one-line row is 16px plus one line of text, a two-line row 16px plus two, so the gap between any two rows is the same 16px however either of them wraps. That is what lets a long page title wrap instead of being clipped, and keeps the list evenly spaced when it does.

The two tokens are independent: change --nav-row-leading and the padding stays where you set it. A lower leading draws the two lines of a wrapped title closer together, a higher one opens them up, and in both cases the space between neighboring rows is unchanged. 1.2 and 1.6 are both comfortable.

What to watch when you change either is the 32px minimum touch target, which rows are also held to. Keep

text
2 × --nav-row-pad  +  --nav-row-leading × text size  ≥  32px

and the padding alone decides the height. At the shipped 8px and 1.4 that holds for every row the theme draws except the deeper levels of the table of contents: the sidebar’s 13px and 12px rows come to 34.2px and 32.8px, and the first TOC level to 32.8px. Where it does not hold the minimum takes over and adds a fraction of a pixel to one-line rows that wrapped rows do not get — the second and third TOC levels, both at 11px, come to 31.4px and are held up to 32. It is not visible at that scale, but lowering the padding much further makes it so, and then wrapped and unwrapped rows really do sit at different distances from their neighbors.

Icons

Every icon in the interface comes from one set, Lucide, and each is held in an --icon-* token. They ship inside the stylesheet as inline SVG rather than as an icon font, so nothing is downloaded to draw them:

PropertyUsed by
--icon-chevron-downThe one disclosure arrow: header menu parents, sidebar sections, accordions, version dropdown
--icon-chevron-rightBreadcrumb separator
--icon-menu, --icon-xNavigation drawer open and close buttons; --icon-x also closes the table-of-contents panel
--icon-table-of-contentsThe button that opens the table of contents on small screens
--icon-panel-right-openThe same button on a listing page, where it opens the browse column
--icon-searchSearch field
--icon-sun, --icon-moon, --icon-monitorTheme toggle — sun, moon or monitor, naming the position the button is currently on
--icon-link, --icon-checkHeading anchor link, and its copied confirmation
--icon-thumbs-up, --icon-thumbs-downHelpfulness rating
--icon-thumbs-up-filled, --icon-thumbs-down-filledHelpfulness rating, the reader’s own vote
--icon-folder, --icon-file-textCategory and document cards on the documentation index and listing pages
--icon-arrow-left, --icon-arrow-rightPrevious / next links and paginated archives
--icon-loader, --icon-alertSearch index progress, and the marker shown if part of the index fails to load

Icons are painted as masks rather than images, so each one takes the color of the text around it and follows the light/dark toggle automatically — you never restyle an icon to match a color change. To swap one, point its token at your own SVG as a data URI. Any color in that SVG is ignored; only its shape is used:

css
:root {
    /* A plus sign in place of the breadcrumb chevron. */
    --icon-chevron-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M12 5v14'/%3E%3C/svg%3E");
}

Like the radii and widths above, these are the same in both color schemes, so :root alone is enough. Font Awesome is separate: it is loaded only on pages whose content uses fa- icon classes, and it does not affect the interface icons here.

A tinted logo is drawn the same way — its shape comes from the SVG you uploaded and its color from --color-accent — so changing the accent, whether in the Customizer or in a child theme, retints the mark with no rule of its own. With a Dark mode logo set, the shape comes from whichever of the two matches the current theme. See Tint Logo With Accent Color.

Was this page helpful?