Skip to content

feat(toast): add CSS variables for box-shadow and border - #16679

Merged
manucorporat merged 2 commits into
ionic-team:masterfrom
paulstelzer:toast-variables
Dec 11, 2018
Merged

manucorporat merged 2 commits into
ionic-team:masterfrom
paulstelzer:toast-variables

Conversation

@paulstelzer

Copy link
Copy Markdown
Contributor

Short description of what this resolves:

Border of a toast can be customized by adding border properties. This properties match other Ionic components like button, checkbox, item and many more:

   * @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
   * @prop --box-shadow: Box shadow of the toast

Also fixed box-shadow of the ion-button

One example to show a custom border has been added.

Preview:

2018-12-11_08-50-17

Changes proposed in this pull request:

Feature Request: #16666

@ionitron-bot ionitron-bot Bot added the package: core @ionic/core package label Dec 11, 2018
@paulstelzer paulstelzer changed the title Toast variables feat(toast): add CSS variables for box-shadow and border Dec 11, 2018
@manucorporat
manucorporat merged commit 1a299b0 into ionic-team:master Dec 11, 2018
@manucorporat

Copy link
Copy Markdown
Contributor

Thanks again for the great PR!

@naayaaa

naayaaa commented Feb 25, 2019

Copy link
Copy Markdown

can you give us an example to use it?

it seems it has no effect on my project, i tried to add {text-align: center; --width: 70%;} to my scss file with

.mytoast {...}
.ion-toast.mytoast {...}
.mytoast{ .toast-wrapper{...} }
.mytoast{ .toast-container{...} }
.mytoast{ .toast-message{...} }

None above worked :(

@sardapv

sardapv commented Apr 22, 2020

Copy link
Copy Markdown

@manucorporat is there any way we can specify top-border-width only? i did it with insspect elements but seems like toast-wrapper is in shadow dom so its not reflecting. can we have this feature please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants