Fork me on GitHub
#clojurescript
<
2021-06-04
>
isak15:06:51

Anyone using fontawesome via JS + Svgs in ClojureScript + React? Does it work well? (We are using FA with webfonts)

djblue16:06:18

I started using them recently with reagent, work fine for me. https://github.com/djblue/portal/blob/master/src/portal/ui/icons.cljs

isak16:06:36

Hmm, would it work to also refer to them by the css classes, like before? Asking because changing to that style would be a huge refactoring for us

djblue16:06:01

I think you can but then you have an svg asset loading problem. You could choose to load all the svgs or would have to manually require the ones you use.

isak16:06:54

Ok, all would work for us, since we don't know all the icons needed until runtime. Thanks.

djblue16:06:55

I do wonder what the difference in size would be between the font file vs all the svgs

isak16:06:29

I heard it is a little worse to use the svgs, but not that bad. And the problem we are running into is not being able to use the advanced FA features like stacking and masking icons.

👍 2