tomkr4l / font_awesome5_rails

font_awesome_5_rails is font awesome 5 gem bundled for rails asset pipeline
https://fontawesome.com/
MIT License
158 stars 25 forks source link

Webfont scss require #24

Closed themire closed 6 years ago

themire commented 6 years ago

If I do @import 'font_awesome5_webfont'; in my .scss file I get the following output in my CSS.

/*
 *= require fontawesome-all
*/
/* line 5, ../../.rvm/gems/ruby-2.5.1@beam/gems/font_awesome5_rails-0.3.5/app/assets/stylesheets/font_awesome5_webfont.css */
.fa5-text {
  padding-left: 5px;
}

If I just do @import 'fontawesome-all'; it works.

tomkr4l commented 6 years ago

@themire I've been looking into this and It should be working one of these ways:

  1. If you want to user @import, you have to include .css to the end (my answer from here was wrong). So It should be working with @import 'font_awesome5_webfont.css' in your application.scss file.

  2. Second way is to require it in your application.css. So *= require font_awesome5_webfont should be working too.

themire commented 6 years ago

Working, thanks.