diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:57:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:57:26 +0000 |
commit | 30883c26bdceb9eaf32c8d4a1b0c1bce223b5226 (patch) | |
tree | 39a02e2aeb21ab5b7923c6f5757d66d55b708912 /wp-includes/style-engine/class-wp-style-engine.php | |
parent | Adding upstream version 6.4.3+dfsg1. (diff) | |
download | wordpress-30883c26bdceb9eaf32c8d4a1b0c1bce223b5226.tar.xz wordpress-30883c26bdceb9eaf32c8d4a1b0c1bce223b5226.zip |
Adding upstream version 6.5+dfsg1.upstream/6.5+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-includes/style-engine/class-wp-style-engine.php')
-rw-r--r-- | wp-includes/style-engine/class-wp-style-engine.php | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/wp-includes/style-engine/class-wp-style-engine.php b/wp-includes/style-engine/class-wp-style-engine.php index 121bac2..99372b5 100644 --- a/wp-includes/style-engine/class-wp-style-engine.php +++ b/wp-includes/style-engine/class-wp-style-engine.php @@ -23,6 +23,8 @@ * @since 6.1.0 * @since 6.3.0 Added support for text-columns. * @since 6.4.0 Added support for background.backgroundImage. + * @since 6.5.0 Added support for background.backgroundPosition, + * background.backgroundRepeat and dimensions.aspectRatio. */ #[AllowDynamicProperties] final class WP_Style_Engine { @@ -48,14 +50,26 @@ final class WP_Style_Engine { */ const BLOCK_STYLE_DEFINITIONS_METADATA = array( 'background' => array( - 'backgroundImage' => array( + 'backgroundImage' => array( 'property_keys' => array( 'default' => 'background-image', ), 'value_func' => array( self::class, 'get_url_or_value_css_declaration' ), 'path' => array( 'background', 'backgroundImage' ), ), - 'backgroundSize' => array( + 'backgroundPosition' => array( + 'property_keys' => array( + 'default' => 'background-position', + ), + 'path' => array( 'background', 'backgroundPosition' ), + ), + 'backgroundRepeat' => array( + 'property_keys' => array( + 'default' => 'background-repeat', + ), + 'path' => array( 'background', 'backgroundRepeat' ), + ), + 'backgroundSize' => array( 'property_keys' => array( 'default' => 'background-size', ), @@ -177,7 +191,16 @@ final class WP_Style_Engine { ), ), 'dimensions' => array( - 'minHeight' => array( + 'aspectRatio' => array( + 'property_keys' => array( + 'default' => 'aspect-ratio', + ), + 'path' => array( 'dimensions', 'aspectRatio' ), + 'classnames' => array( + 'has-aspect-ratio' => true, + ), + ), + 'minHeight' => array( 'property_keys' => array( 'default' => 'min-height', ), @@ -215,6 +238,9 @@ final class WP_Style_Engine { 'default' => 'font-size', ), 'path' => array( 'typography', 'fontSize' ), + 'css_vars' => array( + 'font-size' => '--wp--preset--font-size--$slug', + ), 'classnames' => array( 'has-$slug-font-size' => 'font-size', ), @@ -223,6 +249,9 @@ final class WP_Style_Engine { 'property_keys' => array( 'default' => 'font-family', ), + 'css_vars' => array( + 'font-family' => '--wp--preset--font-family--$slug', + ), 'path' => array( 'typography', 'fontFamily' ), 'classnames' => array( 'has-$slug-font-family' => 'font-family', |