Theming

NoPressure public pages use theme files stored in the runtime root under themes/. A theme file has the .theme extension and contains one variable per line:

color-background-primary-light #fdf2f2
font-body-size 16px

The first whitespace separates the variable name from the value. Empty lines and lines starting with # are ignored. Values are emitted directly into CSS variables, so use valid CSS values for the expected property type.

Theme Selection

OptionDefaultRangeNotes
Theme file location<runtime-root>/themes/default.themeFiles ending in .theme under <runtime-root>/themes/Hidden files and non-.theme files are not listed in the admin theme library.
Page theme valueEmpty / not setTheme file name without .themeEmpty or missing values select default.theme.
New theme nameNone1-128 characters: lowercase ASCII letters, numbers, -, _; no dotsThe .theme extension is added automatically.
Theme variable keyNoneASCII letters, numbers, -, _Invalid keys and lines without values are ignored when rendering.
Theme variable valueNoneAny valid CSS value for the variable's expected propertyValues are not type-validated by NoPressure. Invalid CSS is ignored by the browser for affected declarations.
Missing requested themedefault.themeAny valid page theme valueIf the selected file cannot be loaded, the renderer falls back to default.theme.
Missing default themeInline fallbackBuilt inThe inline fallback only covers a minimal body, page background, content, and navbar style.

New runtime roots create themes/default.theme from the embedded red theme. The repository also ships palette files under assets/themes/: blue, default, green, grey, orange, pink, purple, red, teal, and yellow.

Base Palette

These variables control the main light and dark colour scheme. Defaults are the values used by the embedded red theme that bootstraps new runtime roots.

VariableDefaultRangeUsed for
color-background-primary-light#fdf2f2Valid CSS colorLight body background and gradient start.
color-background-secondary-light#f8b4b4Valid CSS colorLight page gradient end and search result hover background.
color-content-background-light#ffffffValid CSS colorLight search panel, search results, copy button, close button backgrounds.
color-text-primary-light#7f1d1dValid CSS colorLight body text, headings, strong text, navbar brand, code text, table headings.
color-text-secondary-light#991b1bValid CSS colorLight paragraph/list/table body text, subtitles, secondary controls.
color-navbar-background-lightrgba(255, 255, 255, 0.95)Valid CSS colorReserved palette entry; defined in themes but not consumed by the preset stylesheet.
color-footer-background-lightrgba(255, 255, 255, 0.95)Valid CSS colorReserved palette entry; defined in themes but not consumed by the preset stylesheet.
color-border-lightrgba(220, 38, 38, 0.2)Valid CSS colorLight borders for code blocks, search UI, copy buttons, and result rows.
color-shadow-lightrgba(220, 38, 38, 0.1)Valid CSS colorLight search panel shadow colour.
color-code-background-light#fee2e2Valid CSS colorLight inline code and code block background.
color-blockquote-background-light#fee2e2Valid CSS colorLight blockquote background.
color-table-border-light#fca5a5Valid CSS colorLight content table borders.
color-table-header-background-light#fee2e2Valid CSS colorLight content table header background.
color-background-primary-dark#450a0aValid CSS colorDark body background and gradient start.
color-background-secondary-dark#7f1d1dValid CSS colorDark page gradient end, search input background, search result hover background.
color-content-background-dark#7f1d1dValid CSS colorDark search panel, search results, copy button, close button backgrounds.
color-text-primary-dark#fecacaValid CSS colorDark body text, headings, strong text, navbar brand, code text, table headings.
color-text-secondary-dark#f87171Valid CSS colorDark paragraph/list/table body text, subtitles, secondary controls, navbar links.
color-navbar-background-darkrgba(127, 29, 29, 0.95)Valid CSS colorReserved palette entry; defined in themes but not consumed by the preset stylesheet.
color-footer-background-darkrgba(127, 29, 29, 0.95)Valid CSS colorReserved palette entry; defined in themes but not consumed by the preset stylesheet.
color-border-darkrgba(248, 113, 113, 0.3)Valid CSS colorDark borders for code blocks, search UI, copy buttons, and result rows.
color-shadow-darkrgba(0, 0, 0, 0.4)Valid CSS colorDark search panel shadow colour.
color-code-background-dark#991b1bValid CSS colorDark inline code and code block background.
color-blockquote-background-dark#991b1bValid CSS colorDark blockquote background.
color-table-border-dark#dc2626Valid CSS colorDark content table borders.
color-table-header-background-dark#991b1bValid CSS colorDark content table header background.

Accent And Navigation

VariableDefaultRangeUsed for
color-content-link-light#dc2626Valid CSS colorLight content links and focus outlines.
color-content-link-dark#f87171Valid CSS colorDark content links and focus outlines.
color-breadcrumb-link-dark#f87171Valid CSS colorDark breadcrumb links.
color-content-blockquote-border-light#dc2626Valid CSS colorLight blockquote left border.
color-navbar-dropdown-arrow-light#b91c1cValid CSS colorLight nested dropdown arrow hover colour.
color-navbar-dropdown-border-top-lightrgba(220, 38, 38, 0.2)Valid CSS colorLight mobile dropdown top border.
color-navbar-dropdown-item-hover-background-light#fee2e2Valid CSS colorLight dropdown item hover background.
color-navbar-dropdown-background-dark#450a0aValid CSS colorDark navbar dropdown background.
color-navbar-dropdown-border-darkrgba(248, 113, 113, 0.3)Valid CSS colorDark navbar dropdown border.
color-navbar-dropdown-shadow-darkrgba(0, 0, 0, 0.4)Valid CSS colorDark navbar dropdown shadow colour.
color-navbar-dropdown-item-hover-background-dark#991b1bValid CSS colorDark dropdown item hover background.
color-navbar-link-hover-background-dark#991b1bValid CSS colorDark navbar link hover background.
color-navbar-dropdown-link-hover-background-dark#991b1bValid CSS colorDark nested dropdown link hover background.
color-notification-warning-background-dark#dc2626Valid CSS colorDark warning notification background.
color-notification-warning-text-dark#fef2f2Valid CSS colorDark warning notification text.

Typography

VariableDefaultRangeUsed for
font-body-family'Segoe UI', Tahoma, Geneva, Verdana, sans-serifValid CSS font-family listBody text, controls, search UI, and hero fallback fonts.
font-heading-family'Segoe UI', Tahoma, Geneva, Verdana, sans-serifValid CSS font-family listMarkdown headings.
font-mono-familymonospaceValid CSS font-family listInline code and code blocks.
font-body-size16pxValid CSS font-size valueBody font size.
font-body-line-heightnormalValid CSS line-height value: number, length, percentage, or normalBody line height.

Hero Image Shortcode

The hero-img shortcode has additional theme variables. Unlike the main palette, these variables have CSS fallbacks in the preset stylesheet, so they do not need to be present in a theme file unless you want to override them.

VariableDefaultRangeUsed for
sc-hero-img-size-height45vhValid CSS length or viewport-based sizeHero wrapper height.
sc-hero-img-font-title-familyvar(--font-body-family)Valid CSS font-family listHero title font family.
sc-hero-img-font-title-size3remValid CSS font-size valueHero title font size.
sc-hero-img-font-subtitle-familyvar(--font-body-family)Valid CSS font-family listHero subtitle font family.
sc-hero-img-font-subtitle-size1.25remValid CSS font-size valueHero subtitle font size.
sc-hero-img-color-text-lightvar(--color-text-primary-light)Valid CSS colorHero title and subtitle colour in light mode.
sc-hero-img-color-text-darkvar(--color-text-primary-dark)Valid CSS colorHero title and subtitle colour in dark mode.
sc-hero-img-filter-lightifybrightness(1.15)Valid CSS filter valueImage filter when the shortcode has lightify, in light mode.
sc-hero-img-filter-darkifybrightness(0.7)Valid CSS filter valueImage filter when the shortcode has darkify, in dark mode.
sc-hero-img-shadow-light0 0 12px rgba(255, 255, 255, 0.6)Valid CSS text-shadow valueText halo when the shortcode has light-shadow, in light mode.
sc-hero-img-shadow-dark0 0 12px rgba(0, 0, 0, 0.6)Valid CSS text-shadow valueText halo when the shortcode has dark-shadow, in dark mode.

Example

# Runtime default is created as themes/default.theme
color-background-primary-light #fdf2f2
color-background-secondary-light #f8b4b4
color-text-primary-light #7f1d1d
color-content-link-light #dc2626
font-body-family 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif
font-body-size 16px
font-body-line-height normal
sc-hero-img-size-height 45vh