罗盘省略语法 [英] Compass ellipsis syntax

查看:127
本文介绍了罗盘省略语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我觉得自己像个白痴,但我真的不知道。



我正在使用 John Long 的Sass Twitter Bootstrap转换常规Twitter Bootstrap项目。位于 GitHub



每当我编译时得到以下错误:

 错误sass / bootstrap.scss(sass / bootstrap的第246行/ _mixins.scss:
CSS之后的...- shadow($ shadow:expected),was...){)
Sass :: SyntaxError在行[246 ...- shadow($ shadow:
expected),是...){

这里是它抱怨的语法:

  //阴影
@mixin box-shadow($ shadow ...){
-webkit-box-shadow:$ shadow;
-moz-box-shadow:$ shadow;
box-shadow:$ shadow;
}

我从来没有在mixin上看到这种语法。



我的问题是如何解决这个错误。

解决方案



我使用Compass v0.12.2

div>

这是变量参数的语法: http://sass-lang.com /docs/yardoc/file.SASS_REFERENCE.html#variable_arguments



您需要升级Sass,因为它是3.2x的新功能。


I feel like an idiot but I really cannot figure this out.

I'm using John Long's Sass Twitter Bootstrap conversion of the regular Twitter Bootstrap items. Located here on GitHub

Whenever I compile it I get the following error:

    error sass/bootstrap.scss (Line 246 of sass/bootstrap/_mixins.scss: Invalid
CSS after "...-shadow($shadow": expected ")", was "...) { ")
Sass::SyntaxError on line ["246"] of C: Invalid CSS after "...-shadow($shadow":
expected ")", was "...) { "

Here is the syntax that it complains about:

// Drop shadows
@mixin box-shadow($shadow...) { 
  -webkit-box-shadow: $shadow;
     -moz-box-shadow: $shadow;
          box-shadow: $shadow;
}

I've never seen that syntax before with the ellipsis on a mixin.

My question is how do I fix this error. It's clearly a problem I have.

I'm using Compass v0.12.2

解决方案

That is the syntax for variable arguments: http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#variable_arguments

You will need to upgrade Sass, since it is a new feature of 3.2x.

这篇关于罗盘省略语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆