1.0.0 • Published 4 years ago
sass-browser-mixins v1.0.0
Sass Browser Mixins
Browser hacks from browserhacks.com for Dart Sass.
Usage
Install the dependency:
yarn add sass-browser-mixins --dev
Add the library:
@use '<path>/sass-browser-mixins' as *;
This library includes three types of CSS hacks:
- Media query hacks
- Feature query hacks
- Selector hacks
Depending on the targeted version, the first type of hack is used.
Supported hacks:
Browser | Mixin | Version |
---|---|---|
Firefox | firefox or ff | * , 1.5 , >= 2 , <= 3 , >= 3 , >= 3.5 , >= 3.6 , >= 4 , >= 6 , >= 8 , >= 16 , >= 21 , >= 22 , >= 24 , >= 25 , >= 26 , >= 27 , >= 28 , >= 29 , >= 30 |
Internet Explorer | internet-explorer or ie | <= 6 , <= 7 , 7 , <= 8 , 8 , >= 10 , >= 11 |
Safari | safari | 2-3 , 2-3.1 , 5.1-6 |
Opera | opera | >= 9.5 |
Examples
To target Firefox:
.a {
color: yellow;
@include firefox {
color: red;
}
}
.a {
color: yellow;
}
_:-moz-tree-row(hover), .a {
color: red;
}
To target IE 7:
.b {
@include ie('8') {
color: blue;
}
}
@media \0screen {
.b {
color: blue;
}
}
1.0.0
4 years ago