Expand description
Theme system for HTML output styling
Provides a unified theming system for all HTML-outputting platforms. Themes are CSS files that can be applied with or without inlining.
Themes are loaded in two layers:
- Builtins - Embedded at compile time from
templates/themes/ - User themes - Loaded at runtime from user’s
templates/themes/directory
User themes with the same ID override builtins; new IDs extend the registry.
Structs§
- Theme
- A theme with its CSS content
- Theme
Registry - Registry of available themes
Constants§
- BUILTIN_
BASE_ CSS - Base CSS applied to all themes.
Statics§
- BUILTIN_
PREVIEW_ CSS - Built-in preview CSS files (platform_id, css_content).
- BUILTIN_
THEMES - Built-in theme CSS files (id, css_content).
Functions§
- apply_
theme - Apply theme to HTML body content.
- apply_
theme_ full_ document - Apply theme and wrap in full HTML document (for preview pages).
- load_
theme - Load a theme by ID from the registry, with fallback.
- resolve_
theme - Resolve theme using 5-level resolution chain (similar to RFC-0005’s published resolution):