Carry Sass variables through the Assets Pipeline, Rails 3.1 rc1

。_饼干妹妹 提交于 2019-12-02 21:43:02

Sass supports Partials. That way you can include your separate configuration in __configuration.sass_ and reference it with

@import "configuration";

from your main sass-file.

Unfortunately I found out that SASS variables are be page specific.

If you want to carry your variables across all files, remove the *= require_tree . line from your application.css.scss file and replace it with the @import "layout.css.scss"; directive to manually import each sass file.

Yes you have to @import each file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!