doabit / semantic-ui-sass

Semantic UI, converted to Sass and ready to drop into Rails & Compass.
MIT License
1.15k stars 192 forks source link

Sass Undefined variable $font-family #92

Closed choilive closed 6 years ago

choilive commented 7 years ago

I seem to be having an issue upgrading my gem semantic-ui-sass from 2.2.0 to 2.2.6. I am on Rails 5. I am getting an undefined variable for $font-family. Probably related to the "Add font-family variable" commit. It is triggering on the _form file specifically.

Sass::SyntaxError - Undefined variable: "$font-family".: () Users/michaelchoi/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/semantic-ui-sass-0405e7002c7d/app/assets/stylesheets/semantic-ui/collections/_form.scss:102:in ' () Users/michaelchoi/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/semantic-ui-sass-0405e7002c7d/app/assets/stylesheets/semantic-ui/collections/_all.scss:2:in '

Any ideas on how to get around it? I have tried adding a $font-family to my application.scss.css file but no luck there.

doabit commented 7 years ago

@choilive I've tested, it works.

base.scss

@import 'semantic-ui';

application.css

/*
 *= require base
 */
RuBAN-GT commented 7 years ago

I have this problem too, when tris to do assets precomplie for production.

doabit commented 7 years ago

@RuBAN-GT I used the master branch and it works.

base.scss

@import 'semantic-ui';

application.css

/*
 *= require base
 */
2016-11-14 8 46 15
RuBAN-GT commented 7 years ago

@doabit, Yes, thank you. It was my error of rails configuration.

dadave92 commented 7 years ago

@RuBAN-GT, How did you solve this error?

ghost commented 7 years ago

@dadave92 don't use modules. Import all SemanticUI

EnglishLanguageInstitute commented 6 years ago

I am having this same issue. I am trying to move my application to a new production server. I am using the exact same codebase as is running perfectly fine on the original production server. Everything looks like it deploys fine, but the assets don't all display correctly. So I try to run the precompile at the command line and I get the same error: "Sass::SyntaxError - Undefined variable: "$font-family"." I have tried doing exactly as stated above to solve it and it continues to give me the error. Any other ideas?

doabit commented 6 years ago

@EnglishLanguageInstitute Which version?

EnglishLanguageInstitute commented 6 years ago

@doabit The current version I have working on my production server and the first one I tried on the new server is 2.2.9.3. I have tried 2.2.14 on the new server as well with the same result.

doabit commented 6 years ago

@EnglishLanguageInstitute Sorry, i have tested and it works on my mac book and ubuntu server, i use rails 5.2 and gem 'semantic-ui-sass', '>= 2.2.14', 'https://github.com/doabit/semantic-ui-sass/issues/92#issuecomment-260226109'

edipofederle commented 6 years ago

I still facing this issue right now, some more tips into this ?

Thanks