1.0.0 • Published 4 years ago

sass-browser-mixins v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

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:

BrowserMixinVersion
Firefoxfirefox 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 Explorerinternet-explorer or ie<= 6, <= 7, 7, <= 8, 8, >= 10, >= 11
Safarisafari2-3, 2-3.1, 5.1-6
Operaopera>= 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;
  }
}