SASS / COMPASS:无法使用ligthen / darken功能

时间:2021-03-06 18:20:59

I have been using SASS/COMPASS 6 months, great stuff! Today, I wanted to use the lighten()/darken() functions, but I get the following error message:

我一直在使用SASS / COMPASS 6个月,很棒的东西!今天,我想使用lighten()/ darken()函数,但是我收到以下错误消息:

error style.scss (Line 220 of breakpoints/_base.scss: Invalid CSS after 
"lighten": expected "{", was "(#800, 20%);")

Here is how I call it within my .scss file:

以下是我在.scss文件中调用它的方法:

li {
lighten(#800, 20%);
}

I feel I am missing some declaration or import, as it seems the function isn't being recognize, but I haven't found a thing talking about this online.

我觉得我错过了一些声明或导入,因为它似乎没有被识别出来,但我还没有找到一个在线讨论这个问题的事情。

Any suggestion/tip is most welcome!

任何建议/提示是最受欢迎的!

1 个解决方案

#1


7  

You're not setting the lightened color as a style. You probably mean:

你没有把亮色作为一种风格。你可能意味着:

li {
  color: lighten(#800, 20%);
}

#1


7  

You're not setting the lightened color as a style. You probably mean:

你没有把亮色作为一种风格。你可能意味着:

li {
  color: lighten(#800, 20%);
}