-
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
Refactor the Settings button CSS. #14475
Refactor the Settings button CSS. #14475
Conversation
Nice. Tab, hover, focus, look good. There's a small subtle change with the selected state that we should fix. The radius is off, and there's some shimminess around the corners. I've zoomed in these so it's visible. Before: After: Two ways to fix this.
To accomlpish 2, you'd need to find the spot in the code that compiles into this:
And change the height to 36, and line-height to 35. That would make it look like this: But that's sort of a big change. Since we mean to revisit buttons and their focus states across WordPress, perhaps it's best to go with option 1 for now? |
Curious that a solid box-shadow doesn't fully cover the background. Yep I'd go with padding: 7px and margin 1px. |
Done. |
A bit busy today so can't review, but putting it in a milestone because the changes look good at a code glance. |
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.
Thanks, @afercia! These changes look good. It's unfortunate to have to use an !important
override all those button :not()
's, but I think it's more or less fine to do it in this specific case.
I noticed that the height of this button — and all the other toolbar buttons — are different from the height of the text buttons, but seems like that's always been the case, so we can think about that separately:
* Refactor the Settings button CSS. * Remove box-shadow use padding and margin.
* Refactor the Settings button CSS. * Remove box-shadow use padding and margin.
* Refactor the Settings button CSS. * Remove box-shadow use padding and margin.
Fixes #14474.
This PR seeks to solve a Firefox / NVDA bug where changes to the Settings button
aria-expanded
state are not announced because of the CSS pseudo-element used for styling. For more details, please see the related issue #14474.I've opted to just remove the CSS pseudo element and re-implement the styling by other means.
Worth nothing the
.is-toggled:hover
state didn't work as intended, not even on master. I had to use!important
to override a pile of:not()
selectors used in the icon-button. Adding one more:not()
there didn't seem to me the best option.The CSS should replicate the current styling. Do feel free to change it if desired, but please don't use a CSS pseudo-element 🙂
/Cc @jasmussen
Screenshot (for comparison, see the GIF on the issue):