Skip to content
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

Root padding is not getting applied correctly in the Editor #44336

Closed
ndiego opened this issue Sep 21, 2022 · 3 comments
Closed

Root padding is not getting applied correctly in the Editor #44336

ndiego opened this issue Sep 21, 2022 · 3 comments
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended

Comments

@ndiego
Copy link
Member

ndiego commented Sep 21, 2022

Description

In testing the Twenty Twenty-Three theme, I noticed some issues with root padding in the Editor.

First, there is no root padding applied to the Editor itself. Secondly, root padding is applied incorrectly via the .has-global-padding class. On the Frontend, everything appears to be working correctly. See the video for complete information.

I believe that simply adding .has-global-padding to the .is-root-container div if root padding is applied in theme.json will solve this issue. See the video attached for more info.

Step-by-step reproduction instructions

  1. In Twenty Twenty-Three, or another theme that uses root padding, add a new page
  2. Add a paragraph of text to the page.
  3. Next add a Group block, and inside, add a Paragraph block.
  4. Ensure the "Inner blocks use content width" setting is applied to the Group block
  5. Notice that there is left/right padding applied in the Group block
  6. Preview the page on mobile using the Editor view setting
  7. See that the first paragraph goes to the edge of the page
  8. The paragraph in the Group block has the "correct" padding, but it's not applied correctly.
  9. View on the Frontend and everything appears as it should.

Screenshots, screen recording, code snippet

root-padding-editor-compressed.mp4

Environment info

  • WordPress 6.1 Beta
  • Gutenberg 14.1.1
  • Twenty Twenty-Three

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@ndiego ndiego added [Type] Bug An existing feature does not function as intended Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json CSS Styling Related to editor and front end styles, CSS-specific issues. labels Sep 21, 2022
@ndiego
Copy link
Member Author

ndiego commented Sep 21, 2022

@tellthemachines, @richtabor, @bgardner given that you all worked on #43095, I wanted to ping you on this one as well. If anyone can confirm these findings, it would be most appreciated 🙏

@ndiego ndiego moved this from Triage to Todo in WordPress 6.1 Editor Tasks Sep 21, 2022
@t-hamano
Copy link
Contributor

I think #44209 would solve this problem.
However, we may want to consider adding a backport label to this PR.

@tellthemachines
Copy link
Contributor

Closing this issue as the fix from #44209 has been backported to Core.

Repository owner moved this from Todo to Done in WordPress 6.1 Editor Tasks Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended
Projects
No open projects
Development

No branches or pull requests

3 participants