Blazored / Toast

A JavaScript free toast library for Blazor and Razor Component applications
https://blazored.github.io/Toast/
MIT License
663 stars 92 forks source link

Css question #200

Closed carlhoogstoel closed 1 year ago

carlhoogstoel commented 1 year ago

I saw in one of the posts that you suggested just to override the css classes if you want to tweek something. I did what you suggested but my custom css is no taken into account.

As you can see from the screenshots, I added the custom css to my own css file, its loaded and the css isolation is also working as expected.

Can you maybe point me in the right direction as to what I am missing?

toest issue

chrissainty commented 1 year ago

If you inspect the toast and look at the styles tab, are your styles being applied or are they being overriden by something else?

carlhoogstoel commented 1 year ago

Don't think so. Yours are at the top.

image

Mine are after them

image

And the order seems to be ok

image

chrissainty commented 1 year ago

OK, so your styles are being overridden by the default styles (which ever ones are at the top are the ones taking president). That's because the scoped selector has a higher score as it's more specific. Could you try adding !important to your style properties and see they then get applied?

carlhoogstoel commented 1 year ago

This seems to be better

image

chrissainty commented 1 year ago

Cool. So adding !important solved it and applied your styles.

chrissainty commented 1 year ago

Going to close this as the issues seems to be resolved.