Skip to content

Commit

Permalink
Repeat compound classname for specificity
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Mar 8, 2023
1 parent d24fa9f commit 5f59587
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/class-wp-theme-json-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,7 @@ protected function get_layout_styles( $block_metadata ) {
$spacing_rule['selector']
);
} else {
$format = static::ROOT_BLOCK_SELECTOR === $selector ? '%s .%s%s' : ':root %s-%s%s';
$format = static::ROOT_BLOCK_SELECTOR === $selector ? '%1$s .%2$s%3$s' : '%1$s-%2$s%1$s-%2$s%3$s';
$layout_selector = sprintf(
$format,
$selector,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ export function getLayoutStyles( {
? `${ selector } .${ className }${
spacingStyle?.selector || ''
}`
: `:root ${ selector }-${ className }${
: `${ selector }-${ className }${ selector }-${ className }${
spacingStyle?.selector || ''
}`;
}
Expand Down

0 comments on commit 5f59587

Please sign in to comment.