Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SASS: import bourbon lib from another dir in stylesheets

I have a namespace let's say called "pro" and I want to put my sass assets inside app/assets/stylesheets/pro/sellers. I have nested controllers cars is inside sellers.

In my layout I have this stylesheet_link_tag params[:controller] so it's general. This generates the path pro/sellers/cars.css.sass for my config.

In the sass file I want to import the bourbon library, but I get this error:

File to import not found or unreadable: ../functions/linear-gradient.
Load path: Sass::Rails::Importer(/my_project_path/app/assets/stylesheets/pro/sellers/cars.css.sass)
  (in /my_project_path/app/assets/stylesheets/pro/sellers/cars.css.sass)

Is it possible to do that import or is it a limitation?

like image 414
Cristian Avatar asked Nov 13 '22 12:11

Cristian


1 Answers

Sounds like it's a known issue with nested imports in SASS. There is a patch that might help posted here towards the bottom:

https://github.com/thoughtbot/bourbon/issues/26

like image 129
jordanpg Avatar answered Dec 22 '22 06:12

jordanpg