-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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(button): wrap text by default #28682
Conversation
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 could add the nowrap class to these buttons so they don't wrap, if that's preferred over updating the snapshots.
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.
I am okay with keeping this. I think we should avoid custom css where possible.
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 looks great!
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.
I am okay with keeping this. I think we should avoid custom css where possible.
Co-authored-by: Brandy Carney <[email protected]>
Issue number: resolves #8700
What is the current behavior?
Button text is truncated by default.
What is the new behavior?
Does this introduce a breaking change?
Starting in Ionic Framework 7.2, we encouraged developers to opt-in to text wrapping in buttons by setting
ion-text-wrap
.This PR is targeting Ionic Framework v8, where text wrapping of buttons will be the default behavior.
This may cause visual changes across apps using Ionic Framework. Buttons with long text may now be taller than before, leading to layout shifts.
If developers wish to prevent text wrapping, they may use the .ion-text-nowrap class.