exlab_wizard.ui.theme#
Theme registration for NiceGUI / Quasar.
Per Frontend Spec §2.1.1, this module is the single place that injects the
canonical :root { ... } CSS block (DESIGN.md §07). Component CSS uses
var(--color-*) / var(--sp-*) / var(--text-*) / var(--radius-*)
/ var(--shadow-*) references instead of inline literals.
The block is generated from exlab_wizard.ui.design so DESIGN.md and
design.py cannot drift.
Functions
Render the canonical ``:root { . |
|
Mount the project's |
|
Register the design tokens with NiceGUI / Quasar at app start. |
|
Return the absolute path to the bundled |
- exlab_wizard.ui.theme.build_root_css()[source]#
Render the canonical
:root { ... }CSS block from design tokens.The string is intentionally derived from constants in
exlab_wizard.ui.designso a token change automatically lands in the generated CSS without per-call-site updates.- Return type:
- exlab_wizard.ui.theme.register_static_assets()[source]#
Mount the project’s
assets/directory at/assets.Idempotent: a module-level guard prevents double-mounting on import cycles. Returns the resolved assets directory.
- Return type:
- exlab_wizard.ui.theme.register_theme()[source]#
Register the design tokens with NiceGUI / Quasar at app start.
Imports NiceGUI lazily so unit tests can exercise this module without NiceGUI’s import side effects (the package opens browser channels at import time in some configurations).
Returns the CSS string that was registered (handy for tests and for the static-asset bundler).
- Return type: