Adding a class to Ion-app

I’m working on an ionic 3 app where ion-inputs and ion-labels aren’t displaying correctly in IE-11. So, I found a fix using css, however, I need to apply the class to my entire app and I was wondering how can I apply the class to ion-app to target those ion-labels and ion-inputs?

1 Like

add it to your app.scss. That covers the entire scope of your ionic project.

true, but the issue i’m facing is we want to conditionally apply on only when the browser is IE11. and i’m able to detect the user agent but am unable to conditionally apply the class for IE11 only.

1 Like

Wrap your CSS with the following, if you are OK with the CSS targeting IE11 and IE10. This takes advantage of a media query technique to just target MS browsers.

@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    /* IE10 & 11 CSS code goes here */
   
}