Skip to main content

register_theme_json

Function register_theme_json 

Source
pub fn register_theme_json(state_json: &str, theme_json: &str) -> String
Expand description

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.