rails / sass-rails

Ruby on Rails stylesheet engine for Sass
MIT License
860 stars 333 forks source link

@import behaves in different ways in Rails 4.2 and Rails 5.0 #379

Closed oslyak closed 8 years ago

oslyak commented 8 years ago

I have project on Rails 4.2 with sass-rails 5.0.4 and there everything works fine. Now created new project on Rails 5.0 with sass-rails 5.0.5 and copied all SASS(scss) file from old project to new one.

In both project uses sass 3.4.22

I have general.scss

@import 'css3-mixin';
@import 'color';
@import 'class';
@import 'style';

In Rails 5 got error in style.scss:

Undefined variable: "$grey"

So, style.scss does not see variables from _color.scss if it imported in general.scss It works only when write import right in style.scss But except style.scss I have many other files, which uses colors and mixins. In Rails 5 it works, only when I added import in everyone *.scss files which use colors and mixins.

So, whats happened with global namespace for variables and mixins?

TrevorHinesley commented 7 years ago

how did you fix this @oslyak ?

NySiya commented 7 years ago

Excuse me, How did you fixed it? @oslyak

kapso commented 6 years ago

Anyone knows how this was fixed? I am getting this as well and using the following versions -

Rails 5.2.0 sass-rails 5.0.7