Converts each style section into a list of rulesets containing the block styles to be appended to the stylesheet.
Description
See glossary at https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax
For each section this creates a new ruleset such as:
block-selector { style-property-one: value; }
Additionally, it’ll also create new rulesets as classes for each preset value such as:
.has-value-color {
color: value;
}
.has-value-background-color {
background-color: value;
}
.has-value-font-size {
font-size: value;
}
.has-value-gradient-background {
background: value;
}
p.has-value-gradient-background {
background: value;
}Parameters
$style_nodesarrayrequired- Nodes with styles.
$setting_nodesarrayrequired- Nodes with settings.
Source
* added new properties for `border`, `filter`, `spacing`,
* and `typography`.
* @since 6.1.0 Added new side properties for `border`,
* added new property `shadow`,
* updated `blockGap` to be allowed at any level.
* @since 6.2.0 Added `outline`, and `minHeight` properties.
* @since 6.3.0 Added support for `typography.textColumns`.
* @since 6.5.0 Added support for `dimensions.aspectRatio`.
* @since 6.6.0 Added `background` sub properties to top-level only.
* @since 7.0.0 Added support for `dimensions.width` and `dimensions.height`.
* @since 7.1.0 Added support for `background.gradient`,`dimensions.minWidth`,
* and `typography.textShadow`.
* @var array
*/
const VALID_STYLES = array(
'background' => array(
'backgroundImage' => null,
'backgroundPosition' => null,
'backgroundRepeat' => null,
'backgroundSize' => null,
'backgroundAttachment' => null,
'gradient' => null,
),
'border' => array(
'color' => null,
'radius' => null,
Changelog
| Version | Description |
|---|---|
| 5.8.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.