开发者

Sass excluding application.css file for a page

开发者 https://www.devze.com 2023-04-07 11:16 出处:网络
I just upgrade开发者_运维百科d my project from Rails 3.0.7 to 3.1.0 and I see that I can use SASS now.

I just upgrade开发者_运维百科d my project from Rails 3.0.7 to 3.1.0 and I see that I can use SASS now.

I have a page in my application which is just a promotional page at /home/subscribe.html.erb and I would like it to not inherit the css declarations being used throughout the application like the scaffold.css. There is a separate subscribe.css file which I would like it to inherit ONLY.

Even though I have gone inside my application.css.scss and changed it to have only: @import "scaffold.css.scss"; the application.css.scss still gets inherited as a part of the application in to the subscribe page.

can you please suggest how to make the subscribe page ONLY use the subscribe.css file and no other css?


Create a new layout that has a css tag that directly targets the css file you wish to import rather than application.css.

0

精彩评论

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

关注公众号