为什么这个SCSS嵌套规则不起作用?

时间:2014-06-14 15:59:52

标签: gem sass bootstrap-sass

我正在使用sass bootstrap和“compass compile”命令来编译这段代码。

#main {
  color: black;
  &-sidebar { border: 1px solid; }
}

我收到此错误

  

错误scss / realocation.scss(scss / helpers / _test.scss的第3行:“&”之后的无效CSS:期望“{”,是“-sidebar {bord ...”

这很奇怪,因为这是SASS documentation

中完全相同的代码

这是已安装宝石的列表。

bigdecimal (1.2.0)
bootstrap-sass (3.1.1.1)
CFPropertyList (2.2.0)
chunky_png (1.3.1)
compass (0.12.6)
fssm (0.2.10)
io-console (0.4.2)
json (1.7.7)
libxml-ruby (2.6.0)
minitest (4.3.2)
nokogiri (1.5.6)
psych (2.0.0)
rake (0.9.6)
rdoc (4.0.0)
rubygems-update (2.3.0)
sass (3.3.8, 3.2.19)
sqlite3 (1.3.7)
susy (2.1.2)
test-unit (2.0.0.0)

和指南针框架

 * blueprint
    - blueprint/basic      - A basic blueprint install that mimics the actual blueprint css.
    - blueprint/buttons    - Button Plugin
    - blueprint/link_icons - Icons for common types of links
    - blueprint/project    - The blueprint framework.
    - blueprint/semantic   - The blueprint framework for use with semantic markup.
  * compass
    - compass/ellipsis     - Plugin for cross-browser ellipsis truncated text.
    - compass/extension    - Generate a compass extension.
    - compass/pie          - Integration with http://css3pie.com/
    - compass/project      - The default project layout.

也许这是我缺少的东西?

0 个答案:

没有答案
相关问题