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

New layouts seem to lose .has-global-padding class #43673

Closed
bgardner opened this issue Aug 28, 2022 · 4 comments · Fixed by #43689
Closed

New layouts seem to lose .has-global-padding class #43673

bgardner opened this issue Aug 28, 2022 · 4 comments · Fixed by #43689
Assignees
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Bug An existing feature does not function as intended

Comments

@bgardner
Copy link

Description

On a theme of mine, I am trying to update things to use the new layout controls. When I replace this:

<!-- wp:post-content {"layout":{"inherit":true}} /-->

With this:

<!-- wp:post-content {"layout":{"type":"constrained"}} /-->

The result is that the original markup of:

<div class="has-global-padding is-layout-constrained entry-content wp-block-post-content">

Becomes this:

<div class="is-layout-constrained entry-content wp-block-post-content">

Step-by-step reproduction instructions

See above

Screenshots, screen recording, code snippet

No response

Environment info

WordPress 6.0.1, Gutenberg 14.0 RC2

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 [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels Aug 29, 2022
@ndiego
Copy link
Member

ndiego commented Aug 29, 2022

@tellthemachines and @andrewserong pinging you both on this. This seems like a bug but figured you both would know more. This issue is related to WordPress/twentytwentythree#121

@mikachan
Copy link
Member

Confirming that I can also see this happening on my local site: the is-global-padding class is removed when "layout":{"type":"constrained"} is enabled.

I'm using WordPress 6.0.1 and the latest GB trunk.

@bgardner
Copy link
Author

If this is indeed a bug (which I believe it is, and a big one), I'd love to see this addresses and included in the 14.0 release. This significantly impacts Site Padding.

@andrewserong
Copy link
Contributor

Thanks for the ping! I believe I have a fix for this in #43689 if folks would like to take a look.

I'm travelling at the moment, so apologies if I don't get back to feedback on the PR immediately! 🙂

@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Bug An existing feature does not function as intended
Projects
None yet
5 participants