Coda Chang Coda Chang - 3 months ago 23
Sass (Sass) Question

Rails use sass to import css

I use rails and bootstrap by using this bootstrap-sass

I've moved

application.css
to
application.scss
, so I can't use
*= require_tree
.

There are bunch of css files in
assets/stylesheets
, how can I import them?

I tried following ways but all of these seems not work.

@import "freelancer";
@import "freelancer.css";
@import "freelancer.css"!force;

Answer

Scss being a superset of css, you can just change your .css extension to .scss, it will still work in the same way.

Then you can require them like this, and it should work:

@import "freelancer";