-
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
Fix: Disabled block switcher icons are blurry #15643
Conversation
6943126
to
3f1a8af
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.
This definitely fixes the issue. All the icons look perfectly crisp with this PR:
I'll hold off for a developer's input on the actual method used. But I can confirm that this absolutely solves the problem. I don't see any negative effects to other block switcher icons either. Thanks, @gziolo!
I think that having both Travis and @kjellr happy is enough to proceed but I will wait for ✅ :) |
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.
Seems legit for me
Description
Fixes #15629.
It looks like
IconButton
has a very unexpected logic for addinghas-text
class. It adds it when children prop is passed which was the case. However, an icon isn't really the text 🤷♂Before
When the block switcher is disabled, the block icon inside of it appears smaller than it should, resulting in some blurry icons on non-retina screens. Here's the Container block icon for instance, appearing at
20px
wide:For comparison, here's a non-disabled icon, which renders at the correct
24px
wide:Screenshots
After