Which Sass version does Compass use?

972 views
Skip to first unread message

Marijke Luttekes

unread,
Apr 18, 2014, 8:42:32 AM4/18/14
to compas...@googlegroups.com
For a project I'd like to use a feature that was introduced in version 3.3 of Sass, where you can use the ampersand sign as part of a class. So you can do:

.some-class {
  &__some-child-class {
    // this would compiled as .some-class__some-child-class
  }
}

The technique is also described in the following article: http://mikefowler.me/2013/10/17/support-for-bem-modules-sass-3.3/

As always I have Compass Watch running with the required versions of Sass and Compass*, the above technique does not work. I get the following error:

Syntax error: Invalid CSS after " &": expected "{", was "__some-child-class {"

I've noticed on Compass's version page (https://rubygems.org/gems/compass) that the current version of Compass has a runtime dependency on Sass 3.2.19, which is a version which does not yet support the technique. Is this the version of Sass that Compass uses to compile my stylesheets? And if yes, is there any way I can make my compiler work with Sass 3.3.x instead?

*I have the latest versions of Sass and Compass installed, Sass 3.3.5 (Maptastic Maple) and Compass 0.12.5 (Alnilam).

John Riviello

unread,
Apr 25, 2014, 1:58:06 PM4/25/14
to compas...@googlegroups.com
You need the pre-release alpha version of Compass 1.0 in order to use Sass 3.3 with Compass. Install it with:

gem install compass --pre
Reply all
Reply to author
Forward
0 new messages