在SASS Compass中禁用浏览器前缀?

时间:2016-01-31 12:33:26

标签: css sass compass-sass compass

有没有办法禁用Compass添加的所有浏览器前缀?

实施例

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

生成这个:

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

但我想要的只是:

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

是的,我可以简单地替换

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

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

但我不想修改SASS代码。

1 个答案:

答案 0 :(得分:0)

我解决了这个问题:

compass interactive
browsers()

获得所有支持的浏览器:

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

最后将其添加到sass文件中:

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