-
Notifications
You must be signed in to change notification settings - Fork 65
Full-width groups have no side paddings #240
Comments
This may be related — I've been through hoops trying to get padding to work as expected. WordPress/gutenberg#43095 This is def related: WordPress/gutenberg#44404 |
@YanCol Thank you for creating the issue. I was still waiting for a reply on WordPress/gutenberg#44404 My idea for the patch below is a more simple/classic approach of applying the padding to the container instead of to the children. -- Rule 1:
Rule 2:
Rule 3:
-- I have not looked into __inner-container blocks ( not sure if there are many left, potentially the cover block ? ). -- My current patch, which works well for me with TT3 and FSE in general, so far: 🤞 /*Rule 1*/
.has-global-padding > .alignfull {
margin-right: calc(var(--wp--style--root--padding-right) * -1);
margin-left: calc(var(--wp--style--root--padding-left) * -1);
padding-right: var(--wp--style--root--padding-right);
padding-left: var(--wp--style--root--padding-left);
}
/*Rule 2*/
.has-global-padding > .alignfull:where(:not(.is-layout-constrained)) {
padding-left: 0;
padding-right: 0;
}
/*Rule 3*/
.has-global-padding > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]), p, h1, h2, h3, h4, h5, h6, ul, ol) {
padding-left: 0;
padding-right: 0;
} Hope this helps! Appreciate your feedback on this. 👋 |
Closing as the theme has been merged into the WordPress Core SVN repository and is no longer maintained on GitHub. |
On a page, when I insert a full-width group with content inside, the content touches the viewport's edges on mobile/tablet.
I would expect the full-width group to be padded with the root padding values defined by the theme.json/user.
Step-by-step reproduction instructions
The text was updated successfully, but these errors were encountered: