WP_Style_Engine
class WP_Style_Engine
// Constructor: function Object() { [native code] } The main class integrating all other WP_Style_Engine_* classes.
Methods 12 methods
| Method / Return | Description |
|---|---|
| get_slug_from_preset_value() string | Util: Extracts the slug in kebab case from a preset string,
Parameters: $style_value: mixed, $property_key: mixed |
| get_css_var_value() string | Util: Generates a CSS var string, e.g. `var(--wp--preset--color--background)`
Parameters: $style_value: mixed, $css_vars: mixed |
| is_valid_style_value() bool | Util: Checks whether an incoming block style value is valid.
Parameters: $style_value: mixed |
| store_css_rule() void | Stores a CSS rule using the provided CSS selector and CSS declarations.
Parameters: $store_name: mixed, $css_selector: mixed, $css_declarations: mixed, $rules_group: mixed |
| get_store() (WP_Style_Engine_CSS_Rules_Store | Returns a store by store key.
Parameters: $store_name: mixed |
| parse_block_styles() array | Returns classnames and CSS based on the values in a styles object.
Parameters: $block_styles: mixed, $options: mixed |
| get_classnames() string[] | Returns classnames, and generates classname(s) from a CSS preset property pattern,
Parameters: $style_value: mixed, $style_definition: mixed |
| get_css_declarations() string[] | Returns an array of CSS declarations based on valid block style values.
Parameters: $style_value: mixed, $style_definition: mixed, $options: mixed |
| get_individual_property_css_declarations() string[] | Style value parser that returns a CSS definition array comprising style properties
Parameters: $style_value: mixed, $individual_property_definition: mixed, $options: mixed |
| get_url_or_value_css_declaration() string[] | Style value parser that constructs a CSS definition array comprising a single CSS property and value.
Parameters: $style_value: mixed, $style_definition: mixed |
| compile_css() string | Returns compiled CSS from CSS declarations.
Parameters: $css_declarations: mixed, $css_selector: mixed |
| compile_stylesheet_from_css_rules() string | Returns a compiled stylesheet from stored CSS rules.
Parameters: $css_rules: mixed, $options: mixed |