Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48981

How to override styling in :host?

$
0
0

For a specific media query I want to override the styling of ion-content. I am doing it with an ID to have a high specifity:

@media (min-width: 992px) {
    #content {
        width: 50rem;
        margin: 0 auto !important;
    }
}

As you can see in the following screenshot (highlighted in yellow) the previous styling of margin in :host is not getting overridden. As soon I delete !important of it, my css rules are getting applied.

How can I override :host styling?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48981

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>