How can I change the CSS output formatting style for SASS
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?
Try this: sass --watch style.scss:style.css --style
OPTION
where OPTION
is one of these: compressed
, compact
, nested
, or expanded
.
Example for compressed:sass --watch style.scss:style.css --style
compressed
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
精彩评论