Crate themed_styler

Crate themed_styler 

Source

Modules§

api

Structs§

State
ThemeEntry

Enums§

Error

Functions§

get_default_state_json
Return the embedded default state as a JSON string.
get_rn_styles
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.
get_version
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
set_theme_json
Set the default and current theme. Returns the updated state as JSON.
version

Type Aliases§

CssProps
SelectorStyles