-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Try: output float clearing for all centered blocks. #21608
Conversation
I don't personally have a strong opinion here. It feels like CSS to support sort of an edgecase, which suggests we might not want to do it, and let themes handle it in the theme itself AND the editor. But at the same time, it does feel weird that a centered block following a floated block might look broken, and the fix is easy. So I created this PR to move things forward. If we choose to not do this, as mentioned, the way to address this is a user option as outlined in #21608. |
Size Change: +11 B (0%) Total Size: 839 kB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not usually a fan of opinionated styles, but I can't think of any practical downsides to this. It seems reasonable enough to me.
Thank you Zeb! I'm going to actually leave this up for a while longer just to gather some more thoughts. |
Given there's been no feedback, through the law of diminishing returns and the fact that it's trivial to revert, I'm going to merge this one. |
This PR needs feedback. It is a replacement for #16780.
What it does is output a simple float-clearing rule for any block that is aligned center.
To test, insert two images. The first one you float left, the 2nd one you align center.
Before:
After:
To be perfectly clear, this is output in the editor and on the frontend.
In the past, this has been the purview of the theme itself, but lately there has been some discussion on how much or how little the editor should "help" here. That's why this PR needs discussion.