-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Post Content Block: Fix conflict between clearFix and focus ring in the editor #65364
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: -28 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
I'm adding this PR to the project board because it addresses an issue that first appeared in WP 6.7. |
c22a4ef
to
b355273
Compare
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.
Works well for me! I also tested the original steps in #63690 and it still worked. 💯
@kevin940726 Thanks for the review! Just to be safe, I will rebase this PR, retest it and then merge it. |
b355273
to
64bd80e
Compare
@kevin940726 Is it ok to backport this PR to WP 6.7? Because the problem this PR is trying to solve first appeared in WP 6.7. |
I'm not @kevin940726 😄, but this sounds reasonable to me! I've added the label so that it'll try to auto-cherry pick once this PR lands. |
I don't see why not! Thank you @andrewserong for labelling it! |
This looks good to go 👍 |
…he editor (#65364) Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: kevin940726 <kevin940726@git.wordpress.org> Co-authored-by: andrewserong <andrewserong@git.wordpress.org> Co-authored-by: getdave <get_dave@git.wordpress.org>
I just cherry-picked this PR to the wp/6.7 branch to get it included in the next release: b4dd404 |
Alternatives to #63690
What?
This PR restores the focus ring in the editor by taking a different approach to solving the issue of left- and right-aligned blocks overflowing their content area.
Why?
#63690 added a clearfix (
::after
pseudo-element) to the Post Content block to fix overflow issues. In the editor, the::after
pseudo-element is used as a focus ring when the block is selected, causing conflicts.How?
Use
display: flow-root
instead of theclearfix
. This style determines how to handle floated items in a container and should be equivalent to theclearfix
. This CSS is supported in major browsers: https://caniuse.com/flow-rootTesting Instructions
Screenshots or screen
Before
After