FortAwesome / font-awesome-sass

Font-Awesome Sass gem for use in Ruby/Rails projects
MIT License
913 stars 265 forks source link

Switch to dart sass #221

Open xeron opened 1 year ago

xeron commented 1 year ago

Since libsass and sassc are deprecated, can we please switch this gem to use dart sass instead?

BenMorganMY commented 1 year ago

I am also curious about this. sassc is deprecated and dart-sass is the way now.

anatoljevich commented 12 months ago

The same. Had a lot of pain installing sassc on ElasticBeanstalk latest ruby-3.2 platform.

rgaufman commented 7 months ago

Any update on this? - is there an alternative gem that uses dartsass-rails instead?

chadlwilson commented 7 months ago

@rgaufman Probably depends what you're relying on here other than font-awesome-sass (rails app based on your comment?), but you might want to consider patching with https://github.com/sass-contrib/sassc-embedded-shim-ruby (in reference to the workarounds there which will hook sassc and redirect things to dart-sass).

There's an example of usage like this at either

rgaufman commented 7 months ago

What I ended up doing was just downloading the minified version of font-awesome and placing the relevant files in vendor/assets/javascript, vendor/assets/stylesheets and vendor/assets/fonts, that allowed me to remove the dependency on this gem and consequently sassc, happy days :)

Maybe worth adding a deprecation warning to this gem so people know it relies on obsolete/dead/dangerous code?

BrianHawley commented 5 months ago

If you drop the sassc dependency then you can use either sassc-rails or dartsass-sprockets. I've used dartsass-sprockets with a patched version of this gem that drops the sassc dependency, and it works fine.

There may be no reason to support dartsass-rails with this gem because it gets its font-awesome dependencies from elsewhere. The only thing that the gem adds in that case is the icon helper method.