JSFiddle - React, Tailwind, and code Playground

HTML

<div class="class"></div>

CSS

.class {
    background-color: red;
    width: 150px;
    height: 150px;
}
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    /* IE10+ styles go here */
    .class {
        background-color: gray;
    }
}

JavaScript

var mql = window.matchMedia("screen and (-ms-high-contrast: active), (-ms-high-contrast: none)");
mql.addListener(handleMediaQuery);
handleMediaQuery(mql);

function handleMediaQuery(mql) {
    if (mql.matches) {
        console.log('ie')
    }
}