dimanche 4 novembre 2018

How do I specify the stylesheets in my project are compiled/loaded?

I have a file in my folder theme/skins/default.css and I have another file called /style.css. I want the styles from default.css to be added to my application.css after the styles in style.css. Aside from manually copying them, how do I do it? Basically all the stylesheets in my theme/skins/ folder, I would like to be added to my application.css file after my style.css.

In other words, I would like the styles in my theme/skins/default.css to override the files in my style.css where they do exist.

How do I go about doing that within the constraints of the Rails 3.2 asset pipeline?

Edit 1

Note that I tried this:

/*
 *
 *= require_tree .
 *= require "theme/skins/default"
 *= require_self
 */

@import "bootstrap";
@import "font-awesome";

And that doesn't render it in the correct order.

When I do a view source on my page, this is what I see:

<link href="/assets/theme/skins/default.css?body=1" media="screen" rel="stylesheet" type="text/css" />
<link href="/assets/theme/slick.css?body=1" media="screen" rel="stylesheet" type="text/css" />
<link href="/assets/theme/style.css?body=1" media="screen" rel="stylesheet" type="text/css" />
<link href="/assets/application.css?body=1" media="screen" rel="stylesheet" type="text/css" />

Aucun commentaire:

Enregistrer un commentaire