NOTE: Mixin is below this readme
A simple scss mixin to apply styles to IE elements.
Based on the stackoverflow answer given by "cimmanon" in "Is it possible to use a mixin for browser-specific CSS"
Below is the the scss mixin and is used as follows:
To target all versions of IE
Scss:
.btn{
background-color:red;
width:100%;
color:white;
&.btn-active {
background-color:green;
@include if-is-ie {
background-color: red;
}
}
}
CSS:
.btn {
background-color: red;
width: 100%;
color: white;
}
.btn.btn-active {
background-color: green;
}
.lt-ie8 .btn.btn-active,
.lt-ie9 .btn.btn-active,
.lt-ie10 .btn.btn-active,
.gt-ie9 .btn.btn-active {
background-color: red;
}
To target all certain versions of IE
Scss:
.btn{
background-color:red;
width:100%;
color:white;
&.btn-active {
background-color:green;
@include if-is-ie(9 10) {
background-color: red;
}
}
}
CSS:
.btn {
background-color: red;
width: 100%;
color: white;
}
.btn.btn-active {
background-color: green;
}
.lt-ie9 .btn.btn-active,
.lt-ie10 .btn.btn-active {
background-color: red;
}