Skip to main content

Crate themed_styler

Crate themed_styler 

Source

Modules§

api

Structs§

State
ThemeEntry

Enums§

Error

Functions§

build_state_from_theme_json
Build State from theme JSON for programmatic style resolution. Used by relay-runtime to resolve className+tag→style on non-web platforms.
get_default_state_json
get_default_state_json_impl
Return the embedded default state as a JSON string.
get_theme_list_json
Get all theme keys and names as JSON array: [{ “key”: “default”, “name”: “Default Theme” }, …] Returns array of themes from the state JSON.
post_process_css
Flatten CSS with potential selectors that include media prelude. This simple post-processor merges entries that use the special selector format “@media (min-width: X) {” where we will close the block at the end. We group by media and inside concatenate selectors.
register_theme_json
Register a theme from JSON. On duplicate, replace the theme’s selectors, inheritance, and variables. Expected JSON format: { "name": "theme-name", "theme": { "inherits": "parent", "selectors": {...}, "variables": {...}, "breakpoints": {...} } } Returns the updated state as JSON, or “{}” on error.
render_css_for_web
render_css_for_web_impl
Plain Rust implementation used by both WASM and native (e.g. Android JNI).
set_theme_json
themed_styler_free_string
themed_styler_render_css
themed_styler_version
version

Type Aliases§

CssProps
SelectorStyles