Skip to main content

ui_tokens_css

Function ui_tokens_css 

Source
pub fn ui_tokens_css() -> String
Expand description

The design tokens from ui.css, alone, for the documentation book.

The book and this daemon’s own pages should look like one product, and the honest way to get that is one definition of the palette rather than two that agree today. What is shared is deliberately only the tokens: ui.css below the reset styles h2 as a small uppercase eyebrow and gives body a centred max-width, which is right for a node page built out of section elements and wrong for a book with a sidebar. Components stay per-surface; colour, type scale, spacing and easing are shared.

The cut is the reset marker rather than a line number, and a missing marker is a panic rather than a silent half-file: this is rendered into a generated artifact that a staleness test compares, so a slice that quietly returned everything would put the whole sheet in the book and still look like it worked.

§Panics

If ui.css no longer carries the reset marker that separates its tokens from its component styles, or either theme selector this widens for mdBook.