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

Wp-block-image: Breaks natural CSS flow on floating alignment properties #28820

Closed
Intervik opened this issue Feb 7, 2021 · 4 comments
Closed
Labels
[Block] Image Affects the Image Block CSS Styling Related to editor and front end styles, CSS-specific issues.

Comments

@Intervik
Copy link

Intervik commented Feb 7, 2021

What problem does this address?

wp-block-image has no markup as a parent to floating image such as alignleft. Top level elements should NEVER break the CSS flow. <div><figure class="alignleft"></figure></div> is wrong. Properties like alignleft + p { margin-top: } or alignleft ~ h2 { clear: both; } etc etc not working.

What is your proposed solution?

Add classname to top level element such as has-float or attribute data-align=left or whatever. Or better, keep figure element as top level element.

@tellthemachines
Copy link
Contributor

Ideally the figure should be the top-level element.

@tellthemachines tellthemachines added [Block] Image Affects the Image Block CSS Styling Related to editor and front end styles, CSS-specific issues. labels Feb 12, 2021
@AtrumGeost
Copy link

I got this same issue. Noticed that when the Image Block is centered the

tag is gone:

Screen Shot on 2021-05-06 at 11-17-01

On the screenshot, you'll notice the second and third image don't have the

element because they are aligned to the center.

@andrewstaffell
Copy link

This is basically the same issue as #33385.

@tellthemachines
Copy link
Contributor

Closing as this has now been fixed, as per discussion in #33385.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block CSS Styling Related to editor and front end styles, CSS-specific issues.
Projects
None yet
Development

No branches or pull requests

4 participants