@package: Theme
-
Collects valid block style variations keyed by block type.
-
Merges two sets of spacing size presets.
-
Generates a set of spacing sizes by starting with a medium size and applying an operator with an increment value to generate the rest of the sizes outward from the medium size. The medium slug is ’50’ with the rest of the slugs being 10 apart. The generated names use t-shirt sizing.
-
Generates a selector for a block style variation.
-
Remove insecure element styles within a variation or block.
-
Remove insecure styles from inner blocks and their elements.
-
Scopes the selectors for a given style node.
-
Unwraps shared block style variations.
-
Return the input schema at the root and per origin.
-
Filters the theme requirement validation response.
-
Migrates from v2 to v3.
-
Returns theme JSON object.
-
Adds variations sourced from block style variations files to the supplied theme.json data.
-
Adds variations sourced from the block styles registry to the supplied theme.json data.
-
Determines if a supplied style variation matches the provided scope.
-
Resolves relative paths in theme.json styles to theme absolute paths and returns them in an array that can be embedded as the value of `_link` object in REST API responses.
-
Resolves relative paths in theme.json styles to theme absolute paths and merges them with incoming theme JSON.
-
Returns the selectors metadata for a block.
-
Generates all the element selectors for a block.
-
Generates style declarations for a node’s features e.g., color, border, typography etc. that have custom selectors in their related block’s metadata.
-
Replaces CSS variables with their values in place.
-
Resolves the values of CSS variables in the given styles.
-
This is used to convert the internal representation of variables to the CSS representation.
-
Given a tree, converts the internal representation of variables to the CSS representation.
-
Prepends a sub-selector to an existing one.
-
Removes indirect properties from the given input node and sets in the given output node.
-
Returns a filtered declarations array if there is a separator block with only a background style defined in theme.json by adding a color attribute to reflect the changes in the front.
-
Processes the CSS, to apply nesting.
-
Returns the global styles custom CSS.
-
Returns an array of all nested JSON files within a given directory.