Skip to content
Closed
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
7 changes: 7 additions & 0 deletions src/wp-includes/style-engine/class-wp-style-engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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' ),
),
),
);

Expand Down
5 changes: 4 additions & 1 deletion tests/phpunit/tests/style-engine/styleEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function tear_down() {
* @ticket 58590
* @ticket 60175
* @ticket 61720
* @ticket 62189
*
* @covers ::wp_style_engine_get_styles
*
Expand Down Expand Up @@ -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',
Expand All @@ -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',
),
),
),
Expand Down