Persisting SCSS variables in rails asset pipeline? -



Persisting SCSS variables in rails asset pipeline? -

i'm upgrading rails app lots of scss stylesheets utilize asset pipeline, , need include global variables , mixins each file.

adding several @import directives @ top of every file isn't dry, i'd this:

# application.css /* *= require variables *= require mixins *= require_tree . */

this doesn't work of course, because variables not persisted across files. know how accomplish this?

the default manifest syntax isn't powerful plenty give useful sass features shared variables, mixins, etc. instead, should:

rename application.css application.css.scss

instead of using

/* *= require variables *= require mixins *= require_tree . */

nonsense, should use

@import "variables"; @import "mixins"; @import "blah"; // import each scss file in project this.

this ensure have total benefit of variables , mixins throughout project, , kept dry sass allows.

ruby-on-rails-3.1 asset-pipeline sass

Comments

Popular posts from this blog

delphi - blogger via idHTTP : error 400 bad request -

c++ - compiler errors when initializing EXPECT_CALL with function which has program_options::variables_map as parameter -

How do I check if an insert was successful with MySQLdb in Python? -