how to scale (large) font-awesome icons from the react-icons package

前端 未结 4 1654
温柔的废话
温柔的废话 2021-02-19 18:21

I am using the marvelouse react-icons package (http://gorangajic.github.io/react-icons/fa.html), specifically the font awesome package.

If this was not react, then I wou

4条回答
  •  无人共我
    2021-02-19 18:37

    if you want a 5x icon size you need to pass it to the react class as size

    // Font awesome pixel sizes relative to the multiplier. 
    // 1x - 14px
    // 2x - 28px
    // 3x - 42px
    // 4x - 56px
    // 5x - 70px
    
    
    

    if you notice it jumps by 14 each time

    from the github readme it shows everything is overridden inline. its rendering a svg so you cant use 5x you have to use a pixel size

提交回复
热议问题