Skip to content

Commit

Permalink
simplify CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian committed May 17, 2022
1 parent 6bdf2fa commit 5328524
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
5 changes: 1 addition & 4 deletions lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,7 @@ protected static function additional_root_selector_rules( $selector, $theme_json
if ( $use_root_vars ) {
// These rules are duplicated in use-global-styles-output.js.
$block_rules .= '.wp-site-blocks { padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom); }';

$block_rules .= '.wp-site-blocks
{ padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }';

$block_rules .= '.wp-site-blocks { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }';
$block_rules .= '.wp-site-blocks .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); width: unset; }';

// Alignfull blocks in the block editor that are direct children of post content should also get negative margins.
Expand Down
2 changes: 0 additions & 2 deletions packages/block-library/src/cover/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
box-sizing: border-box;

&.alignfull {
margin-right: var(--wp--style--root--padding-right, 1em);
margin-left: var(--wp--style--root--padding-left, 1em);
padding-right: var(--wp--style--root--padding-right, 1em);
padding-left: var(--wp--style--root--padding-left, 1em);
}
Expand Down
2 changes: 0 additions & 2 deletions packages/block-library/src/group/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
}

.wp-block-group.alignfull {
margin-right: var(--wp--style--root--padding-right);
margin-left: var(--wp--style--root--padding-left);
padding-right: var(--wp--style--root--padding-right);
padding-left: var(--wp--style--root--padding-left);
}

0 comments on commit 5328524

Please sign in to comment.