sup*_*mbo 5 gruntjs compass-sass compass
运行Compass 0.12.7(Alnilam)我重复多次遇到此错误:
Running "compass:dev" (compass) task
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
Cannot determine the opposite position of: to
unchanged public/styles/sass/ie_only.scss
unchanged public/img/icons-s6ab39d30ab.png
overwrite public/styles/css/screen.css (2.484s)
Run Code Online (Sandbox Code Playgroud)
我接受它的渐变是错误的,但这里出了什么问题,我该如何缓解这个问题呢?
我在使用 compass 0.12.7 的项目中遇到了同样的问题,不幸的是,这个问题只能通过更新 compass 来解决。linear-gradient当使用位置值类似于to right以下示例的mixin时,会导致出现问题警告:
div {
@include background(linear-gradient(to right, red, blue));
}
Run Code Online (Sandbox Code Playgroud)
这将被编译为类似这样的内容(在问题中抛出错误):
div {
background: -webkit-gradient(linear, to right, to left, color-stop(0%, #ff0000), color-stop(100%, #0000ff));
background: -webkit-linear-gradient(to right, #ff0000, #0000ff);
background: -moz-linear-gradient(to right, #ff0000, #0000ff);
background: -o-linear-gradient(to right, #ff0000, #0000ff);
background: linear-gradient(to right, #ff0000, #0000ff);
}
Run Code Online (Sandbox Code Playgroud)
不幸的是,这是无效的 CSS 代码。正确的输出应该如下:
div {
background: -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, #ff0000), color-stop(100%, #0000ff));
background: -moz-linear-gradient(left, #ff0000, #0000ff);
background: -webkit-linear-gradient(left, #ff0000, #0000ff);
background: linear-gradient(to right, #ff0000, #0000ff);
}
Run Code Online (Sandbox Code Playgroud)
正如我之前所说,解决这个问题的唯一方法是更新指南针。
| 归档时间: |
|
| 查看次数: |
1079 次 |
| 最近记录: |