Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global styles: background UI controls #59454

Merged
merged 14 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions lib/class-wp-theme-json-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,26 +286,31 @@ class WP_Theme_JSON_Gutenberg {
*
* Indirect properties are not output directly by `compute_style_properties`,
* but are used elsewhere in the processing of global styles. The indirect
* property is used to validate whether or not a style value is allowed.
ramonjd marked this conversation as resolved.
Show resolved Hide resolved
* property is used to validate whether a style value is allowed.
*
* @since 6.2.0
* @since 6.6.0 Added background-image properties.
*
* @var array
*/
const INDIRECT_PROPERTIES_METADATA = array(
'gap' => array(
'gap' => array(
array( 'spacing', 'blockGap' ),
),
'column-gap' => array(
'column-gap' => array(
array( 'spacing', 'blockGap', 'left' ),
),
'row-gap' => array(
'row-gap' => array(
array( 'spacing', 'blockGap', 'top' ),
),
'max-width' => array(
'max-width' => array(
array( 'layout', 'contentSize' ),
array( 'layout', 'wideSize' ),
),
'background-image' => array(
array( 'background', 'backgroundImage', 'url' ),
array( 'background', 'backgroundImage', 'source' ),
ramonjd marked this conversation as resolved.
Show resolved Hide resolved
),
);

/**
Expand Down Expand Up @@ -1359,7 +1364,7 @@ public function get_block_custom_css_nodes() {
*
* @since 6.6.0
*
* @param array $css The block css node.
* @param array $css The block css node.
* @param string $selector The block selector.
*
* @return string The global styles custom CSS for the block.
Expand Down
Loading
Loading