Prechádzať zdrojové kódy

Fix FSE padding for BB themes. (#4176)

Force the 'body' (which, in the editor is applied to a different
element) margin and padding to obey the values set by the theme.

Remove the padding applied to the "post content" as the padding is now
applied a different way.
Jason Crist 4 rokov pred
rodič
commit
3e7ce2fad0

+ 2 - 7
blockbase/assets/ponyfill.css

@@ -3,8 +3,8 @@
  * - Reset the browser
  * - Reset the browser
  */
  */
 body {
 body {
-	margin: 0;
-	padding: 0;
+	margin: 0 !important;
+	padding: 0 !important;
 }
 }
 
 
 body {
 body {
@@ -55,11 +55,6 @@ img {
 /**
 /**
  * These are default block editor widths in case the theme doesn't provide them.
  * These are default block editor widths in case the theme doesn't provide them.
  */
  */
-.is-root-container {
-	padding-left: var(--wp--custom--post-content--padding--left);
-	padding-right: var(--wp--custom--post-content--padding--right);
-}
-
 .wp-block-group.alignfull,
 .wp-block-group.alignfull,
 *[class*="wp-container-"] {
 *[class*="wp-container-"] {
 	padding-left: var(--wp--custom--post-content--padding--left);
 	padding-left: var(--wp--custom--post-content--padding--left);

+ 0 - 7
blockbase/sass/base/_alignment.scss

@@ -1,10 +1,3 @@
-// This targets the editor. It is the closest equivalent to .wp-block-post-content,
-// since the editor does not output that class. 
-.is-root-container {
-	padding-left: var(--wp--custom--post-content--padding--left);
-	padding-right: var(--wp--custom--post-content--padding--right);
-}
-
 .wp-block-group.alignfull,
 .wp-block-group.alignfull,
 *[class*="wp-container-"] //Anything that inherits layout (container)
 *[class*="wp-container-"] //Anything that inherits layout (container)
 {
 {

+ 2 - 2
blockbase/sass/base/_normalize.scss

@@ -1,8 +1,8 @@
 
 
 // Remove the margin in all browsers.
 // Remove the margin in all browsers.
 body {
 body {
-  margin: 0;
-  padding: 0;
+  margin: 0 !important;
+  padding: 0 !important;
 }
 }
 
 
 // Smooth out the fonts
 // Smooth out the fonts