开发者

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 --styleOPTION where 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 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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜