As far as I can tell I need to set the compass environment by hand inside my config.rb
.
compass_config do |config|
config.environment = environment
end
Now I’d like to access that variable inside my stylesheets to conditionally add development styles.
@import 'susy';
@if compass-env() == 'development' {
.foo { @include susy-grid-background; }
}
I guess that should do it, but I end up getting a NoMethodError: undefined method []' for nil:NilClass
inside compass-0.12.2/lib/compass/sass_extensions/functions/env.rb
// I’m using Haml’s SCSS filter as a workaround for now …