Skip to main content
Citizen provides a comprehensive set of CSS custom properties (CSS variables) that can be used to customize the appearance of your wiki. These variables are organized into several categories and support both light and dark themes.

Color System

Progressive Colors

The primary accent color used throughout the skin.
VariableDescriptionLight ThemeDark Theme
--color-progressivePrimary progressive colorOKLCH 53.25% 0.1679 262.29OKLCH 60% 0.1679 262.29
--color-progressive--hoverProgressive color on hover+4% lightness+4% lightness
--color-progressive--activeProgressive color on active-4% lightness-4% lightness
--color-progressive-oklch__hProgressive hue (OKLCH)262.29262.29
--color-progressive-oklch__cProgressive chroma (OKLCH)0.16790.1679
--color-progressive-oklch__lProgressive lightness (OKLCH)53.25%60%

Surface Colors

Background colors for different surface levels, with progressive tinting based on the accent color.
VariableDescriptionLight ThemeDark Theme
--color-surface-0Base surfaceOKLCH 96%OKLCH 14%
--color-surface-1First elevated surfaceBase - 2%Base + 2%
--color-surface-1--hoverSurface 1 hover state+4% lightness+4% lightness
--color-surface-1--activeSurface 1 active state-4% lightness-4% lightness
--color-surface-2Second elevated surfaceBase - 4%Base + 4%
--color-surface-2--hoverSurface 2 hover state+4% lightness+4% lightness
--color-surface-2--activeSurface 2 active state-4% lightness-4% lightness
--color-surface-3Third elevated surfaceBase - 6%Base + 6%
--color-surface-4Fourth elevated surfaceBase - 8%Base + 8%

Text Colors

VariableDescriptionLight ThemeDark Theme
--color-basePrimary text colorOKLCH 20%OKLCH 80%
--color-emphasizedEmphasized textOKLCH 5%OKLCH 93%
--color-subtleSubtle/secondary textOKLCH 35%OKLCH 70%
--color-placeholderPlaceholder textOKLCH 40%OKLCH 60%
--color-disabledDisabled textOKLCH 60%OKLCH 50%
--color-inverted-primaryInverted text (on dark backgrounds)#fff#fff
--color-inverted-fixedFixed inverted text#fff#fff
VariableDescription
--color-linkLink color (inherits from progressive)
--color-link--hoverLink hover color
--color-link--activeLink active color
--color-visitedVisited link color
--color-visited--hoverVisited link hover color
--color-visited--activeVisited link active color
--color-link-redRed link color (for non-existent pages)

State Colors

VariableDescriptionDefault Value
--color-destructiveDestructive actionsHSL(340, 100%, 40%/50%)
--color-destructive--hoverDestructive hover+4% lightness
--color-destructive--activeDestructive active-4% lightness
--color-successSuccess stateHSL(170, 100%, 17%/35%)
--color-warningWarning stateHSL(48, 100%, 40%/60%)
--color-errorError stateInherits from destructive

Syntax Highlighting Colors

Based on Material Theme (Lighter for light theme, Palenight for dark theme).
VariableLight ThemeDark Theme
--color-syntax-red#e53935#f07178
--color-syntax-orange#f76d47#f78c6c
--color-syntax-yellow#e2931d#ffcb6b
--color-syntax-green#91b859#c3e88d
--color-syntax-cyan#39adb5#89ddff
--color-syntax-blue#6182b8#82aaff
--color-syntax-paleblue#8796b0#b2ccd6
--color-syntax-purple#9c3eda#c792ea
--color-syntax-brown#916b53#916b53
--color-syntax-pink#ff5370#ff9cac
--color-syntax-violet#945eb8#bb80b3
--color-syntax-grey#90a4ae#676E95

Layout & Spacing

Size Variables

VariableDescriptionDefault Value
--size-iconStandard icon size1.25rem (20px)
--header-sizeHeader width/height3.5rem (56px)
--toolbar-sizeBottom toolbar height2.5rem (40px)
--width-layoutContent width1080px
--width-layout--extendedExtended content width1620px (1.5x layout)
--width-tocTable of contents width240px
--width-pagePage width1080px
--padding-pagePage side padding16px / 24px / 32px
--overflow-gradient-sizeOverflow gradient width2rem

Spacing Scale

Based on a 1rem (16px) space unit with a consistent scale.
VariableMultiplierValue
--space-unit1.01rem (16px)
--space-xxs0.250.25rem (4px)
--space-xs0.50.5rem (8px)
--space-sm0.750.75rem (12px)
--space-md1.01rem (16px)
--space-lg1.251.25rem (20px)
--space-xl1.51.5rem (24px)
--space-xxl2.02rem (32px)

Header Position Variables

Dynamic variables that change based on header position configuration.
VariableDescription
--header-directionFlex direction (row/column)
--header-size-inline-startStart inline size
--header-size-inline-endEnd inline size
--header-size-block-startStart block size
--header-size-block-endEnd block size
--header-inset-block-startBlock start position
--header-inset-block-endBlock end position
--header-offset-block-startOffset for sticky elements
--height-sticky-headerSticky header height offset

Borders & Shadows

Border Variables

VariableDescriptionDefault Value
--border-width-baseBase border width1px
--border-width-thickThick border width2px
--border-radius-baseBase border radius4px
--border-radius-mediumMedium radius8px (2x base)
--border-radius-largeLarge radius12px (3x base)
--border-radius-sharpSharp corners0
--border-radius-pillPill shape9999px
--border-radius-circleCircle50%

Border Colors

VariableLight ThemeDark Theme
--border-color-basergba(0,0,0,0.1)rgba(255,255,255,0.1)
--border-color-subtlergba(0,0,0,0.05)rgba(255,255,255,0.05)
--border-color-mutedrgba(0,0,0,0.03)rgba(255,255,255,0.03)
--border-color-interactivergba(0,0,0,0.1)rgba(255,255,255,0.1)
--border-color-progressiveProgressive colorProgressive color
--border-color-destructiveDestructive colorDestructive color

Composite Border Styles

VariableValue
--border-base1px solid var(—border-color-base)
--border-subtle1px solid var(—border-color-subtle)

Box Shadow Variables

VariableDescription
--box-shadow-smallSmall shadow0 0 0 1px border-color
--box-shadow-mediumMedium shadowMulti-layer shadow
--box-shadow-largeLarge shadowMulti-layer shadow
--box-shadow-borderBorder-style shadowborder-color 0 0 0 1px
--box-shadow-color-alpha-baseShadow color with opacityBased on progressive color

Typography

Font Families

VariableDefault Value
--font-family-baseRoboto, system-ui, sans-serif
--font-family-serifRoboto Serif, Linux Libertine, Georgia, serif
--font-family-monospaceRoboto Mono, Menlo, Consolas, monospace
--font-family-overlinevar(—font-family-base)

Font Sizes (Medium Mode)

VariableSizeLine Height
--font-size-x-small0.75rem (12px)1.25rem (20px)
--font-size-small0.875rem (14px)1.375rem (22px)
--font-size-medium1rem (16px)1.625rem (26px)
--font-size-large1.125rem (18px)1.75rem (28px)
--font-size-x-large1.25rem (20px)1.875rem (30px)
--font-size-xx-large1.5rem (24px)2.125rem (34px)
--font-size-xxx-large1.75rem (28px)2.375rem (38px)

Font Weights

VariableValueAdjusted for High Contrast
--font-weight-normal400500 (more) / 300 (less)
--font-weight-medium500Relative to normal
--font-weight-semi-bold600Relative to normal
--font-weight-bold700Relative to normal

Line Heights

VariableValue
--line-height-x-small1.25rem
--line-height-small1.375rem
--line-height-medium1.625rem
--line-height-large1.75rem
--line-height-x-large1.875rem
--line-height-xx-large2.125rem
--line-height-xxx-large2.375rem
--line-height-content1.625

Effects

Transitions

VariableDescriptionDefault Value
--transition-duration-baseBase duration100ms
--transition-duration-mediumMedium duration250ms
--transition-delay-menuMenu delay100ms
--transition-timing-function-easeCustom easecubic-bezier(0.44, 0.21, 0, 1)
--transition-timing-function-ease-inCustom ease-incubic-bezier(0.75, 0, 1, 1)
--transition-timing-function-ease-outCustom ease-outcubic-bezier(0.215, 0.61, 0.355, 1)

Backdrop Filters

VariableDescriptionValue
--backdrop-filter-frosted-glassFrosted glass effectblur(16px) saturate(140%)
--backdrop-opacityBackdrop opacity0.65
--opacity-glassGlass surface opacity0.9 (light) / 0.8 (dark)

Filters

VariableDescriptionLight ThemeDark Theme
--filter-invertInvert filternoneinvert(1) hue-rotate(180deg)
--filter-invert-fixedFixed invertinvert(1) hue-rotate(180deg)Same
--filter-invert-primaryPrimary invertinvert(1) hue-rotate(180deg)Same
--filter-image-brightnessImage brightnessnonenone

Transforms

VariableDescriptionValue
--transform-image-hoverImage hover scalescale(1.1)

Opacity

VariableDescriptionValue
--opacity-icon-baseIcon base opacity0.6
--opacity-icon-base--hoverIcon hover opacity0.74
--opacity-icon-base--selectedIcon selected opacity1
--opacity-icon-base--disabledIcon disabled opacity0.51

Background Colors

Component Backgrounds

VariableDescription
--background-color-baseBase background (surface-0)
--background-color-neutralNeutral background (surface-2)
--background-color-neutral-subtleSubtle neutral (surface-1)
--background-color-interactiveInteractive element (surface-2)
--background-color-interactive--hoverInteractive hover
--background-color-interactive--activeInteractive active
--background-color-progressiveProgressive button
--background-color-progressive--hoverProgressive hover
--background-color-progressive--activeProgressive active
--background-color-destructiveDestructive button
--background-color-destructive--hoverDestructive hover
--background-color-destructive--activeDestructive active

Icon Backgrounds

VariableLight ThemeDark Theme
--background-color-iconrgba(0,0,0,0.6)rgba(255,255,255,0.6)
--background-color-icon--hoverrgba(0,0,0,0.74)rgba(255,255,255,0.74)
--background-color-icon--activergba(0,0,0,1)rgba(255,255,255,1)

Usage Examples

Custom Component Styling

.my-component {
  background-color: var(--color-surface-1);
  color: var(--color-base);
  border: var(--border-base);
  border-radius: var(--border-radius-medium);
  padding: var(--space-md);
  transition: background-color var(--transition-duration-base) var(--transition-timing-function-ease);
}

.my-component:hover {
  background-color: var(--color-surface-1--hover);
}

.my-component:active {
  background-color: var(--color-surface-1--active);
}

Progressive Button

.custom-button {
  background-color: var(--background-color-progressive);
  color: var(--color-inverted-primary);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-base);
  font-weight: var(--font-weight-semi-bold);
}

.custom-button:hover {
  background-color: var(--background-color-progressive--hover);
}

Responsive Spacing

.content-wrapper {
  padding: var(--padding-page);
  max-width: var(--width-layout);
  margin: 0 auto;
}

/* padding-page automatically adjusts at breakpoints:
   16px mobile, 24px tablet, 32px desktop */

Frosted Glass Effect

.glass-panel {
  background: oklch(
    var(--color-surface-1-oklch__l)
    var(--color-surface-1-oklch__c)
    var(--color-progressive-oklch__h)
    / var(--opacity-glass)
  );
  backdrop-filter: var(--backdrop-filter-frosted-glass);
  border: var(--border-base);
  border-radius: var(--border-radius-large);
}

Theme-Specific Values

Citizen uses CSS custom properties to automatically adapt to light and dark themes. The theme is determined by:
  • User preference (.skin-theme-clientpref-night or .skin-theme-clientpref-day)
  • System preference (.skin-theme-clientpref-os with prefers-color-scheme: dark)
  • Default to light theme
All color variables automatically adjust based on the active theme without requiring manual overrides.

Browser Support

OKLCH Color Space

Citizen uses OKLCH for perceptually uniform colors with automatic HSL fallbacks for older browsers:
/* Modern browsers (OKLCH) */
--color-progressive: oklch(53.25% 0.1679 262.29);

/* Fallback for older browsers (HSL) */
@supports not (color: oklch(100% 0 0)) {
  --color-progressive: hsl(220, 60%, 50%);
}

Build docs developers (and LLMs) love