-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Open
Labels
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v8.x
Current Behavior
When using ion-toast with an icon and a long message that wraps onto multiple lines, the icon is rendered at the top of the toast instead of being vertically centered inline with the text.
- With short messages, the icon appears correctly inline with the text
- With long messages (wrapping to multiple lines), the icon is positioned at the top of the toast container instead of aligning with the text block
Expected Behavior
The icon should remain inline and vertically centered relative to the message text, regardless of message length
Steps to Reproduce
- go to stackblitz
- click on any button
- see result
- shorten message text to single line
- see result
Code Reproduction URL
https://stackblitz.com/edit/s2onkm9n?file=src%2Fapp%2Fexample.component.ts
Ionic Info
see stackblitz
Additional Information
As a workaround i override the icon shadow part:
ion-toast::part(icon) {
display: flex;
align-self: baseline;
margin-top: 15px;
margin-left: 15px;
}
comandos