-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: content switcher icon position #2290
fix: content switcher icon position #2290
Conversation
Deploy preview for the-carbon-components ready! Built with commit de8f984 https://deploy-preview-2290--the-carbon-components.netlify.com |
Hi @lee-chase thank you for trying to address the use case - CC @IBM/carbon-designers to make sure that icon in content switch won't be a problem. BTW comparing https://deploy-preview-2290--the-carbon-components.netlify.com/?nav=content-switcher and https://the-carbon-components.netlify.com/?nav=content-switcher there are some content misalignments - Would you want to try to fix? Thanks! |
@asudoh Fix attempted ;-) p.s. Assuming you were referring to the overflow. |
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 @lee-chase for your quick fix! A couple wrt the update:
- Do we still need
text-overflow
style in content switcher button? - Given this is a markup change, are you willing to change our React variant as well?
Ah yes a bit slapdash of me, hmm must read up on what TDD has to say for superfluous code but harmless code. Probably it isn't broke don't fix it. Strictly speaking, as there's no space between a potential icon and the label you could lose the white-space: nowrap on the btn too. Not sure I'd want to guarantee browser consistency though. React change.. I could probably manage that, but I'd feel a little dirty ;-) Not tonight though. |
@asudoh done |
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 @lee-chase for the update!
Icons not positioned correctly in the content switcher.
Changelog
Changed
Testing / Reviewing
The content switcher icon should align centrally with the text.
See https://codepen.io/lee-chase/pen/mgmmEN with an example of fix.