Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
oslyak opened this issue Jul 16, 2016 · 3 comments
Closed

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

oslyak opened this issue Jul 16, 2016 · 3 comments

Comments

@oslyak
Copy link

oslyak commented Jul 16, 2016

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?

@oslyak oslyak closed this as completed Jul 16, 2016
@TrevorHinesley
Copy link

how did you fix this @oslyak ?

@NySiya
Copy link

NySiya commented Jan 5, 2017

Excuse me, How did you fixed it? @oslyak

@kapso
Copy link

kapso commented Jul 18, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants