-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global Styles Layout Padding is being expressed as a negative value #67476
Comments
@beckej13820 Thanks for reporting this. Could you also reproduce the same behavior with the Twenty-Twenty-Five theme? |
@bph Yes, the screenshots and behavior is with the twenty twenty five theme. |
Hmm, I don't seem to be able to reproduce this with an fresh install of Twenty-Twenty-Five. |
I also couldn't able to reproduce this issue. Can you give more specific steps ? |
I tried to create a 7 minute video where I demonstrate the bug and also go through some of the logical places to check. I haven't done anything very custom to these theme, and although this has a theme.json, I have not modified it from what was provided with twenty twenty-five. |
Could you upload a zip of your exported theme files here? Maybe someone else can use that to replicate the issue. |
Twenty Twenty-Five does not include a frontpage template. Which pattern did you select as the base of the frontpage? These page patterns have different markup and to troubleshoot it, like t-hamano suggested, we need to know what that markup is. |
Thanks for being a little bit patient with me. Attached is my version of twenty twenty five that includes a front page template. As @carolinan noted, I created that front page template. I was able to go to a fresh wordpress install on WordPress playground, upload this (very lightly) modified theme, and see the same behavior on my local site. I have only done edits in the full site editor GUI, I haven't modified the theme at the theme.json level, or written any custom CSS. If I abandon any of my customizations, and select one of the prebuilt styles in twenty twenty five, I can still replicate this, which makes me think this behavior has something to do with the way groups, covers, and column blocks are stacked together. I'm hoping that someone is will be willing to do the replicate on WordPress playground and use their expert eye to try to find the problem. |
@beckej13820 It looks fine on my end. Please refer to the video below for clarification. Screen.Recording.2024-12-03.at.7.55.31.PM.mp4 |
Hi @creador-dev , Can you try again, but this time use Global Styles > Layout |
@beckej13820 Thanks I was able to reproduce this bug in your theme only. If you replace theme.json file in your theme with the original twentytwentyfive it will be fixed. |
@beckej13820 Please replace the theme JSON file with the original version, then verify and confirm if the issue persists. |
I haven't altered the theme.json file. But to try to reproduce, I downloaded twenty twenty five from WordPress.org, deleted my existing theme.json from the server, and replaced with a fresh copy. I'm still seeing the same behavior. I have also uninstalled twenty twenty five and reinstalled from the GUI, which I believe should have accomplished the same thing. |
Once you save any styles in the Site editor, including the padding you are showing, that is saved to the database. |
I finally figured out what was going on. Steps
Video8a9bdd3b40cf84fbf0f884695c8f0d9f.mp4Cause of the problemThis should occur in all themes that support
SolutionI think the only solution is to make the Group block's horizontal padding empty instead of zero. |
The important thing is that this issue is about CSS specificity, and is not caused by the zoom out mode. However, I'm not sure if the issue reported here should be considered a bug. |
Yeah there is no "negative padding". It is the margin that uses the padding value for the calculation. What is the purpose of doing this globally? I would like to understand what the editor (the person, not the Site Editor =D ) was trying to achieve @beckej13820
In the zip file, the export of the theme.json expresses this style as
Which is not part of the theme's original styles. |
It really highlights that the editor needs to show which settings have been changed.
Not being able to see what site wide changes have been made makes all of this unnecessarily difficult. |
Good feedback. @annezazu opened this issue a while back now which is related:
Just checking, unset the group block's horizontal padding when |
I want to thank everyone who contributed to this thread. Thanks for patience with me, and also being willing to do alot to help reproduce what was actually causing the issue. The problem was not well described, because I was coming in late to help and support a student, and saw this unexpected behavior, similar to what @carolinan states. The student who was working on the design is a design student, and has really been struggling with using the site editor. Back when there was a full site editing outreach program, I used to participate in order to share the feedback of novice wordpress users (like this student and sometimes me) because things we got hung up on were often important areas that needed improvement. The problem was probably my fault... I was encouraging her to try to do more changes universally across the entire site instead of tinkering with the settings on each individual block. So she was probably messing with certain sliders just to see what they did. It's a problem with WordPress that no setting / inherited isn't super clearly displayed. It wouldn't surprise me if a student grabs a slider, wiggles it around, says no I don't like that, and puts it back to where it was in the beginning, unaware that putting it back where it first appeared and "reset to empty" are two different things. I think what everyone said about the need for clearly displayed hierarchy of styles is important, but I also just wanted to ask the question.... Is it expected behavior for full width items to overflow the width of the screen, no matter what the padding settings are on a group? Isn't that a problem as well? |
@ramonjd I think this empty padding is something that the user needs to manage, not the code. Basically they should reset it using the control. |
I know this is going off topic but maybe theme.json settings that can not be changed in the interface should still be visible in the interface? |
Yeah that definitely shouldn't be happening!
I'd rather we went the other way around if possible! The root padding logic is non-trivial so I'll have to look into it again, but ideally it would play along with whatever custom padding values are set on the block (whether at a local or global level). |
I'm thinking a neat solution to this would be to change the values of
I feel like we had this working at some point? Maybe it regressed. |
@t-hamano Could you suggest a new, more descriptive name for this issue? |
Description
I found that groups and cover images set to full width were overflowing the page. This was especially apparent when looking in the site editor at the "zoom out" view.
Step-by-step reproduction instructions
Upon further inspection, in the site styles area, in the Layout menu where content widths are defined, it appears that Padding is being applied as a negative value to full width elements.
Steps to reproduce, insert several cover images and full width groups (using a background color will make this bug more apparent)
In the global styles area, change the padding using the left / right padding slider.
Screenshot: Padding is set to "none" no overflow seen:
Screenshot: Padding is set to "regular" contents are overflowing the page:
Screenshots, screen recording, code snippet
No response
Environment info
I found this issue while working with a WordPress site running WordPress 6.7.1 with the Twenty Twenty-Five theme.
Gutenberg plugin not activated, using default WordPress 6.7.1 version.
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: