Skip to main content Module theme Copy item path Source ThemePatchVariables A structure that can be applied to a DOM element to inject theme patch variables. ThemeVariables A structure that can be applied to a DOM element to inject theme variables. ThemePatchToCss A trait for theme patches that only override a subset of variables. ThemeToCss ThemeType A trait that every Silex Theme must implement.
This allows the styled! macro to perform compile-time type checks.
Usually implemented via the theme! macro. set_global_theme Sets a global theme that applies to the entire document (:root). theme_patch Helper that applies a theme patch to an element.
This allows for granular overrides while relying on CSS variable inheritance for the rest. theme_variables Helper that applies theme variables to any element without an extra wrapper.
Usage: div(children).apply(theme_variables(theme)) use_theme Hook to get the current theme signal from context. Theme A dummy theme type to satisfy the default macro requirements.
Users should alias this to their actual theme or use #[theme(MyTheme)].