Skip to content

Commit

Permalink
Fix bump in specificity for layout styles in non-iframed editor
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Aug 6, 2024
1 parent a39a35c commit 95d47fc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-theme-json.php
Original file line number Diff line number Diff line change
Expand Up @@ -1692,7 +1692,7 @@ protected function get_layout_styles( $block_metadata, $types = array() ) {
$spacing_rule['selector']
);
} else {
$format = static::ROOT_BLOCK_SELECTOR === $selector ? '.%2$s %3$s' : '%1$s-%2$s %3$s';
$format = static::ROOT_BLOCK_SELECTOR === $selector ? ':root :where(.%2$s)%3$s' : ':root :where(%1$s-%2$s)%3$s';
$layout_selector = sprintf(
$format,
$selector,
Expand Down
Loading

0 comments on commit 95d47fc

Please sign in to comment.