How can I change the CSS output formatting style for SASS How can I change the CSS output formatting style for SASS ruby ruby

How can I change the CSS output formatting style for SASS


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

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


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 answerUnder 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