Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Use Sass to compensate for deficiencies detected by Modernizr.js
// For example, use "no-cssanimations" for a browser that lacks CSS3 animation support
@mixin modernizr($test) {
html.#{$test} & {
Copy link

taupecat commented Nov 16, 2012


.selector {
    left: 0;

    @include modernizr(no-cssanimations) { left: 400px; }

Compiles to:

.selector {
    left: 0;
} .selector {
    left: 400px;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment