Web: fontawesome : Revert to css

Created on 1 Jun 2018  路  2Comments  路  Source: gitcoinco/web

User Story

Font awesome 5 js seems to be needing optimization.
Seeing lots of console warnings for violations where events take longer than expected.

screen shot 2018-06-01 at 1 07 51 pm

Refs: https://github.com/chrisblakley/Nebula/issues/1582

Potential Fix: Revert back to the CSS method until js svg is optimized and proven worthy of migration

frontend

Most helpful comment

@SaptakS @mbeacom could you guys tell me if this happens at your end ?
If yes -> I'll change it to CSS font-awesome as against the JS svg (Both are font-awesome 5)

@SaptakS context :

We moved from FontAwesome 4 to 5 cause they had more icons and it was lighter.
They have 2 impl -> CSS (same old) & JS + SVG (<i> tag -> replaced by <svg> tag , supposed to be faster , ligher + tree shaking )
Decided to go with the JS and now debating if we should shift to the CSS implementation

Noticed this a while back and not a fan of the flooded console.log 馃槄

All 2 comments

@SaptakS @mbeacom could you guys tell me if this happens at your end ?
If yes -> I'll change it to CSS font-awesome as against the JS svg (Both are font-awesome 5)

@SaptakS context :

We moved from FontAwesome 4 to 5 cause they had more icons and it was lighter.
They have 2 impl -> CSS (same old) & JS + SVG (<i> tag -> replaced by <svg> tag , supposed to be faster , ligher + tree shaking )
Decided to go with the JS and now debating if we should shift to the CSS implementation

Noticed this a while back and not a fan of the flooded console.log 馃槄

@thelostone-mc I know this problem exactly and have faced it in many other open source projects I worked in. The JS as you mentioned does a whole lotta complicated work which ain't needed. And they actually have a CSS only module as well in the version 5. So we can just use that. The font classes and everything remains same. I have had experience in doing this migration, so let me know in case you need any kind of help. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wizzfile picture wizzfile  路  3Comments

kziemianek picture kziemianek  路  3Comments

mbeacom picture mbeacom  路  4Comments

christianbundy picture christianbundy  路  3Comments

IgorPerikov picture IgorPerikov  路  3Comments