user5084534
user5084534

Reputation:

How to load style.scss file in application.css file ruby on rails

I have ruby on rails project in which I want to include scss files in my style sheets that is application.css

The directory structure is look like below:

enter image description here

The problem is that when I try to do this in my application.css file:

 *= require font-awesome
 *= require bootstrap
 *= require slick
 *= require basic-theme
 *= require style
 *= require_self


@import url("style.scss"); //it is in scss folder.

it still does not parse the code in it. Also if I set the path with assets/ it does load it but gives error like:

Sass::SyntaxError in Home#index

Undefined variable: "$base-font".

How I can easily import all these scss files in my rails app? Also any best practices please?

Upvotes: 1

Views: 2290

Answers (1)

Hauleth
Hauleth

Reputation: 23556

Instead you need to use

@import "<relative path to style.css without .scss>"

Upvotes: 0

Related Questions