Search code examples
csssasscompass-sasscompass

Disable browser prefixes in SASS Compass?


Is there a way of disabling all of the browser prefixes that Compass adds?

Example;

.heartbeat {
  @include animation(heartbeat 0.5s linear infinite);
}

Generates this:

.heartbeat {
    -moz-animation    : heartbeat .5s linear infinite;
    -webkit-animation : heartbeat .5s linear infinite;
    animation         : heartbeat .5s linear infinite
}

But all I want is this:

.heartbeat {
    animation         : heartbeat .5s linear infinite
}

Yes, I could simply replace

.heartbeat {
  @include animation(heartbeat 0.5s linear infinite);
}

with

.heartbeat {
  animation(heartbeat 0.5s linear infinite);
}

But I would prefer not to modify the SASS code.


Solution

  • I solved it by doing:

    compass interactive
    browsers()
    

    Got all supported browser:

    ("android", "android-chrome", "android-firefox", "blackberry", "chrome", "firefox", "ie", "ie-mobile", "ios-safari", "opera", "opera-mini", "opera-mobile", "safari")
    

    And finally adding this to a sass-file:

    $supported-browsers: reject(browsers(), "android", "android-chrome", "android-firefox", "blackberry", "chrome", "firefox", "ie", "ie-mobile", "ios-safari", "opera", "opera-mini", "opera-mobile", "safari");