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

Div around Image block in Gutenberg 7.9 #21628

Closed
ghost opened this issue Apr 15, 2020 · 3 comments
Closed

Div around Image block in Gutenberg 7.9 #21628

ghost opened this issue Apr 15, 2020 · 3 comments

Comments

@ghost
Copy link

ghost commented Apr 15, 2020

Hey, I just updated to the new version and noticed that the Image block is now wrapped in a div:

PixelSnap 2020-04-15 at 23 22 25

I assume this is a bug?

@jasmussen
Copy link
Contributor

I believe it is a result of efforts to actually reduce and simplify the DOM in the editor to better match the frontend. Per the discussion in https://github.com/WordPress/gutenberg/pull/21167/files#r398432208, there's still some work to do, and it has to do with refactoring how alignments work. In that vein, I'm going to close this ticket in favor of #20650, which has been created exactly to address this and related issues.

Thanks for the ticket!

@ghost
Copy link
Author

ghost commented Apr 16, 2020

Why doesn't it have any classes though? How am I supposed to target this block now?

@jasmussen
Copy link
Contributor

I agree that div seems completely unnecesary, and I expect it will be removed once #20655 lands.

However that div is only classless when the image is block level, wide or full-wide, so in effect it should be mostly transparent, and you can continue to target .wp-block-image to style the image. This worked before, and it will continue to work both with the div, and when the div gets fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant