You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Toast customization - toast wrapper border color and toast CSS property #16666
Describe the Feature Request
Beta 16 added the --color property to the toast component, and toast-wrapper was put into shadow dom meaning we can no longer style the toast content.
I added CSS definitions that worked in beta 13 that added borders to toast-wrapper, which indicated success / error / info / warning / etc. After upgrading it's no longer possible to use these definitions.
Describe Preferred Solution
I would either like to see a --border property exposed to the toast-wrapper, or to have the toast's CSS property added to the .toast-wrapper like this post recommends @see#16253
Related Code
Ionic related code:
this.toast = await this.toastCtrl.create({
duration: 500000,
position: 'top',
message: text,
// color: color,
cssClass: color, // Currently useless as far as I can tell.
});
Example of the CSS definitions I'd like to continue to be able to use:
changed the title [-]Toast customization - toast wrapper border color / and toast CSS property[/-][+]Toast customization - toast wrapper border color and toast CSS property[/+]on Dec 11, 2018
@ashinpaugh With the next beta, you can add your cssClass and then use this variables:
* @prop --border-color: Border color of the toast
* @prop --border-radius: Border radius of the toast
* @prop --border-width: Border width of the toast
* @prop --border-style: Border style of the toast
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Activity
[-]Toast customization - toast wrapper border color / and toast CSS property[/-][+]Toast customization - toast wrapper border color and toast CSS property[/+]paulstelzer commentedon Dec 11, 2018
Closed by #16679
paulstelzer commentedon Dec 11, 2018
@ashinpaugh With the next beta, you can add your cssClass and then use this variables:
For example (if you add
cssClass: 'info'):ashinpaugh commentedon Dec 11, 2018
Cheers man - much appreciated.
ionitron-bot commentedon Jan 10, 2019
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.