-
-
Notifications
You must be signed in to change notification settings - Fork 53k
vertically center icons in icon-only buttons #48178
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
vertically center icons in icon-only buttons #48178
Conversation
|
👁 Visual Regression Report for PR #48178 Failed ❌
Check Full Report for details |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #48178 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 736 736
Lines 12683 12690 +7
Branches 3326 3329 +3
=========================================
+ Hits 12683 12690 +7 ☔ View full report in Codecov by Sentry. |
the same as: |
ah, I hadn't been able to find the issue on the issue tracker. My bad. Well, hopefully one of the solutions will be merged soon. The other PR is a bit invasive, applying the fix to all styles whereas this PR only applies it to icon-only buttons. |
Co-authored-by: Mehdi Salem <mehdi.salem@qt.io>
🤔 This is a ...
🔗 Related issue link
fix #48071
💡 Background and solution
Currently the icons on buttons aren't vertically centered. This is a regression of a prior issue prevalent in antd 4, namely #31701. To illustrate this I have created the following side-by-side screenshot, highlighting the affected buttons and the icons in different colors and with a dashed border. The left side shows the alignment as is whereas the right side shows the fixed version:
An alternative to the applied fix would've been the following code but I chose the former for brevity:
📝 Changelog
☑️ Self-Check before Merge