From e3226c008bacaea2313c7ed343b49874567f7b2f Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Tue, 17 May 2022 10:47:40 +0100 Subject: [PATCH] simplify CSS --- lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php | 5 +---- packages/block-library/src/cover/style.scss | 2 -- packages/block-library/src/group/theme.scss | 2 -- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php b/lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php index 4a4d3376b2ee9..85f0bded24ee5 100644 --- a/lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php +++ b/lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php @@ -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. diff --git a/packages/block-library/src/cover/style.scss b/packages/block-library/src/cover/style.scss index b07fbb62eb5fe..f545d7594c2f2 100644 --- a/packages/block-library/src/cover/style.scss +++ b/packages/block-library/src/cover/style.scss @@ -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); } diff --git a/packages/block-library/src/group/theme.scss b/packages/block-library/src/group/theme.scss index f3b9866e4dfda..a478880abb9de 100644 --- a/packages/block-library/src/group/theme.scss +++ b/packages/block-library/src/group/theme.scss @@ -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); }