-
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
Avoid focus style from being cut on the categories panel #24197
Conversation
Size Change: +33 B (0%) Total Size: 1.15 MB
ℹ️ View Unchanged
|
@@ -1,6 +1,5 @@ | |||
.editor-post-taxonomies__hierarchical-terms-list { | |||
max-height: 14em; | |||
overflow: auto; |
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.
We can't remove that because the list has a limited height, it needs to be scrollable.
I was able to fix it by using negative margin with the width of the focus outline.
margin-left: -5.5px;
padding-left: 5.5px;
margin-top: -5.5px;
padding-top: 5.5px;
This would replace the padding-left: 2px;
workaround in line 5/6. 5.5 pixels is the result of $border-width * 4 + $border-width-focus
as used here.
Though, I noticed in Chrome that it has some rendering issues with the half pixel value:
The top/left focus outline of the first input field is smaller than the other fields.
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.
Good catch, how did I miss that :)
I applied the suggestion and I think the half-pixel issue is not unique to this particular case, it's something @MichaelArestad is trying to fix separately across the UI.
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.
@youknowriad I have tried two methods. Neither works right now. I ended up having to shelve it for now until either PostCSS updates to work properly (was failing when encountering calc()
within a box shadow) or someone comes up with another idea. :/ It was just taking too much time. I will definitely revisit as the random border widths on 1x devices make the whole editor look bad.
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.
Maybe we should just abandon the 1.5 borders.
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.
@youknowriad That's certainly the simplest solution.
6c98692
to
66a027f
Compare
66a027f
to
03edac1
Compare
closes #23989
That overflow was not necessary.
Testing instructions