gpt4 book ai didi

gruntjs - compass 0.12.7 中的 "Cannot determine the opposite position of: to"错误

转载 作者:行者123 更新时间:2023-12-04 21:14:33 25 4
gpt4 key购买 nike

运行 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)

我接受的梯度有问题,但是这里出了什么问题,我该如何缓解这个问题?

最佳答案

我在使用 compass 0.12.7 的项目中遇到了同样的问题,不幸的是,这个问题只能通过更新 compass 来解决。问题警告是在使用 linear-gradient 时引起的mixin 的位置值为 to right如下例所示:

div {
@include background(linear-gradient(to right, red, blue));
}

这将被编译为这样的东西(在你的问题中抛出错误):

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);
}

不幸的是,这是无效的 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);
}

正如我之前所说,解决它的唯一方法是更新 compass 。

关于gruntjs - compass 0.12.7 中的 "Cannot determine the opposite position of: to"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27051586/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com