John
John

Reputation: 634

Remove stylesheets from layouts

I have two layouts, layout1 and layout2. Layout1 is the first one to load when a new user comes to my website, after creating the account and all he will be sent to layout2. The problem that I have is that my layout1 needs only 3 css files, and layout2 need all of them besides one. How can I remove that one css file?

Thank you

Upvotes: 1

Views: 48

Answers (1)

zwippie
zwippie

Reputation: 15515

In layout1, where you need just 1 stylesheet, change this line:

<%= stylesheet_link_tag    "application", media: "all" %>

to include a different stylesheet, like

<%= stylesheet_link_tag    "layout1_style", media: "all" %>

And of course create layout1_style.css. If that is a very simple stylesheet without the need for less/sass trickery, you could put this stylesheet in the public folder, so it does not interfere with the rest of your styles.

Upvotes: 2

Related Questions