Module theme

Source
Expand description

§Complete Theme Definition

A Theme is a complete, coherent collection of all design tokens needed to render the Fern Shell UI. It combines colors, typography, spacing, and radius into a single validated structure.

§Design Rationale

Rather than scattering token values throughout components, a Theme provides a single source of truth. This ensures:

  1. Completeness — All required tokens are present
  2. Coherence — Tokens are designed to work together
  3. Configurability — Users can customize via config files

§Theme Variants

Fern supports multiple theme variants:

  • Dark — Dark backgrounds with light text (default)
  • Light — Light backgrounds with dark text
  • Auto — Follows system preference (future)

§Example

ⓘ
use fernctl::domain::theme::{Theme, ThemeVariant};

// Load default dark theme
let theme = Theme::dark();

// Access tokens
let bg = theme.colors.background;
let font = &theme.typography.family;
let radius = theme.radius.button();

Structs§

BarConfig
Bar (panel) configuration.
ColorPalette
Color palette for a theme.
Theme
A complete theme combining all design tokens.

Enums§

BarPosition
Bar position on screen.
ThemeVariant
Theme variant selection.

Functions§

default_bar_height 🔒