[Ionic 4] Platform Specific Style in Component


In Ionic 4 / Angular 6, how do I style a custom component for ios or md only?

This doesn’t work in my components .scss:

:root .ios .my-component {
    background-color: red !important!;

I could add classes to each of my components in .ts but this approach seems redundant give there’s a class already on the html element.


Did you find a solution for this?