diff --git a/src/wp-includes/style-engine/class-wp-style-engine.php b/src/wp-includes/style-engine/class-wp-style-engine.php index 3012ca3eefd30..5582aacbb1db9 100644 --- a/src/wp-includes/style-engine/class-wp-style-engine.php +++ b/src/wp-includes/style-engine/class-wp-style-engine.php @@ -25,6 +25,7 @@ * @since 6.4.0 Added support for background.backgroundImage. * @since 6.5.0 Added support for background.backgroundPosition, * background.backgroundRepeat and dimensions.aspectRatio. + * @since 6.7.0 Added support for typography.writingMode. */ #[AllowDynamicProperties] final class WP_Style_Engine { @@ -305,6 +306,12 @@ final class WP_Style_Engine { ), 'path' => array( 'typography', 'letterSpacing' ), ), + 'writingMode' => array( + 'property_keys' => array( + 'default' => 'writing-mode', + ), + 'path' => array( 'typography', 'writingMode' ), + ), ), ); diff --git a/tests/phpunit/tests/style-engine/styleEngine.php b/tests/phpunit/tests/style-engine/styleEngine.php index 686865c6803ab..021232bdf4fef 100644 --- a/tests/phpunit/tests/style-engine/styleEngine.php +++ b/tests/phpunit/tests/style-engine/styleEngine.php @@ -29,6 +29,7 @@ public function tear_down() { * @ticket 58590 * @ticket 60175 * @ticket 61720 + * @ticket 62189 * * @covers ::wp_style_engine_get_styles * @@ -228,11 +229,12 @@ public function data_wp_style_engine_get_styles() { 'textDecoration' => 'underline', 'textTransform' => 'uppercase', 'letterSpacing' => '2', + 'writingMode' => 'vertical-rl', ), ), 'options' => null, 'expected_output' => array( - 'css' => 'font-size:clamp(2em, 2vw, 4em);font-family:Roboto,Oxygen-Sans,Ubuntu,sans-serif;font-style:italic;font-weight:800;line-height:1.3;column-count:2;text-decoration:underline;text-transform:uppercase;letter-spacing:2;', + 'css' => 'font-size:clamp(2em, 2vw, 4em);font-family:Roboto,Oxygen-Sans,Ubuntu,sans-serif;font-style:italic;font-weight:800;line-height:1.3;column-count:2;text-decoration:underline;text-transform:uppercase;letter-spacing:2;writing-mode:vertical-rl;', 'declarations' => array( 'font-size' => 'clamp(2em, 2vw, 4em)', 'font-family' => 'Roboto,Oxygen-Sans,Ubuntu,sans-serif', @@ -243,6 +245,7 @@ public function data_wp_style_engine_get_styles() { 'text-decoration' => 'underline', 'text-transform' => 'uppercase', 'letter-spacing' => '2', + 'writing-mode' => 'vertical-rl', ), ), ),