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

Fix: Demo content cover block alignment not respected #49848

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

t-hamano
Copy link
Contributor

@t-hamano t-hamano commented Apr 15, 2023

Fixes: #28476

What?

This PR fixes a problem where the width of the cover block cannot be changed in the demo content.

0ccfcd01d6ef999a3335a90d1d4c1412.mp4

Why?

It is visually wide, but this is because the alignwide class is specified directly in the additional css class, not set in the block toolbar. Therefore, if you select Node or Center in the block toolbar, the width will not change because the alignwide class will remain.

How?

As far as I know, alignwide/alignfull has never been controlled by additional CSS in the past, but always as an align attribute. Therefore, I believe this is a simple HTML error.

Testing Instructions

Apply None or Center in the block toolbar and make sure it is applied correctly to both the editor and the front end.

Note: If you have saved the demo content at least once, please delete it from the post list.

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Feature] Blocks Overall functionality of blocks labels Apr 15, 2023
@t-hamano t-hamano self-assigned this Apr 15, 2023
@t-hamano t-hamano marked this pull request as ready for review April 15, 2023 14:02
@jasmussen
Copy link
Contributor

Codewise this looks good to me, and since it's such a small change I'd be happy to give a ✅ . However I'm using Local for my env, and the demo content doesn't work in that setup, so I'm unable to test.

Copy link
Contributor

@ajlende ajlende left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working for me 👍

@ajlende ajlende merged commit e5d0843 into trunk Apr 18, 2023
@ajlende ajlende deleted the fix/demo-content-cover branch April 18, 2023 19:50
@github-actions github-actions bot added this to the Gutenberg 15.7 milestone Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Demo content cover block alignment not respected. Migration needed?
3 participants