Skip to main content

Crate orbital_theme

Crate orbital_theme 

Source
Expand description

Orbital theme — CSS variable injection and runtime customization.

Provides OrbitalThemeProvider and theme hooks for light/dark mode, brand color, density, typography, spacing, and elevation overrides.

§First-paint baseline

default_first_paint_baseline_css and ROOT_THEME_SCOPE_ID supply SSR shell CSS (fonts + scoped light-theme vars). Wire into the document shell via orbital::OrbitalFirstPaintHeadAssets. Dark mode, custom brand, and route-specific brand remain runtime responsibilities after hydration.

Structs§

BrandPalette
ColorTheme
CommonTheme
ElevationScale
ShapeOverrides
SpacingScale
Theme
Bundles all injectable tokens for one theme scope.
ThemeInjection
ThemeOptions
ThemeOverrides
TypographyOverrides

Enums§

Density
Direction
ThemeMode

Constants§

BASELINE_STYLESHEET_FILENAME
Filename served from the app static assets directory.
ROOT_THEME_SCOPE_ID
Stable scope id for the root shell [OrbitalThemeProvider].

Functions§

OrbitalThemeProvider
Injects Orbital CSS variables for components.
baseline_active_in_document
baseline_asset_path
Base-path-aware URL for the baseline stylesheet at site root.
baseline_primary_font_preload_path
Base-path-aware URL for the primary UI font preload.
baseline_stylesheet_filename
Baseline stylesheet filename (see BASELINE_STYLESHEET_FILENAME).
brand_ramp
Build an Orbital brand ramp from a single primary hex for light/dark theme overrides.
default_first_paint_baseline_css
Convenience: default_first_paint_theme baseline for the given scope id.
default_first_paint_baseline_css_with_font_prefix
Default first-paint baseline with an explicit font asset prefix.
default_first_paint_theme
Default theme for anonymous first visit (light + product token defaults).
font_faces_css_with_asset_prefix
@font-face rules for Orbital’s default LoMT font stack with an explicit asset prefix.
is_baseline_theme
Returns true when theme matches the default first-paint baseline (light, no overrides).
set_brand_palette
set_density
set_elevation_scale
set_spacing_scale
set_theme_mode
set_typography
should_skip_root_baseline_injection
Skip redundant font/theme StyleRegistry injection for the root provider when baseline covers it.
theme_baseline_css
Full first-paint baseline: @font-face rules plus scoped theme variables.
theme_baseline_css_with_font_prefix
Full first-paint baseline with an explicit font asset prefix (see font_faces_css_with_asset_prefix).
theme_scoped_vars_css
Scoped CSS variables block for a theme scope (no @font-face rules).
use_set_theme
use_theme_mode
use_theme_options
use_update_theme