8

I have read this document regarding setting the options but cannot seem to do it. I've been inside the environment.rb class but not sure what I am doing with the Symbol => Object as I am unfamiliar with Ruby. Can anyone help?

2 Answers 2

19

Try this: sass --watch style.scss:style.css --styleOPTION where OPTION is one of these: compressed, compact, nested, or expanded.

Example for compressed:sass --watch style.scss:style.css --stylecompressed

Sign up to request clarification or add additional context in comments.

Comments

2

UPDATE:

Looks like there may be some initialization issues when using environment.rb to set up sass configurations. Follow the instructions here:

Rails3 and Sass::Plugin::options

Good luck.

---- Original answer Under what circumstances are you using sass? Are you running Rails? I pulled this from the sass docs:

Options

Options can be set by setting the Sass::Plugin.options hash in environment.rb in Rails or config.ru in Rack…

Sass::Plugin.options[:style] = :compact

Just assign the :style entry to one of the available options from the sass docs:

:nested :expanded :compact :compressed

The reason it matters, for example, If you're using Sinatra, you set the sass options totally differently:

set :sass, :style => :compact # default Sass style is :nested

1 Comment

Hi, thanks for your help so far! I'm very new to Ruby but I think it is rails that I'm running. I used the rubyinstaller.org for windows and then ran the gem command to install haml. I now use sass from the ruby command prompt to watch .scss files. I am not sure where I am supposed to to the 'setting' of the style? Do you go into the environment.rb file or run a set style command from the command prompt? I just ran this: set :sass, :style => :compact and that didn't change the out put. Thanks in advance!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.