Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Christina 127 posts 390 karma points notactivated
    Aug 03, 2022 @ 13:10
    Christina
    0

    Regex for Fontawesome 6

    Hi I'm using package Our.Iconic And I would preceate som help with regex for fontawesome 6 I want to render <i class="fa-light fa-alarm-exclamation"></i> I have tried

    ./fa-(light)+:before {

    ./fa-(solid|regular|light|brands|duotone|thin)+:before {

    .(fa-[\w-]+):before {

    Nothing seems to works, I have checked the path to the font and it's ok. Maybee someone can point me in right direction.

    Many thanks in advance /Christina

  • Christian Spencer 2 posts 93 karma points
    Aug 10, 2022 @ 14:10
    Christian Spencer
    101

    Hello,

    I have just been trying to get Font Awesome 6 working with this also.

    I found that if you use the following regex ".(fa-[\w-]+):{2}before {" it should return the icons.

    I'm using the all.css file on both the css file and Rules source file as I believe all the icons are in this css file, and you can swap out the light|regular|bold|duotone etc out using a different selector.

    Attached picture below of my config.

    Umbraco back office Iconic setup

    Hopefully that works for your setup also!

    Thanks,

    Christian

  • Christina 127 posts 390 karma points notactivated
    Aug 11, 2022 @ 11:53
    Christina
    0

    Hi it works you have saved my, day big thanks. /Christina

  • guy pensart 1 post 71 karma points
    Jul 24, 2023 @ 10:23
    guy pensart
    0

    enter image description here

    enter image description here

    I tried this for the brands. But its not working :( Can anyone help me?

    Thanks in advance, G.

  • Chris Smith 39 posts 142 karma points
    Sep 08, 2023 @ 15:09
    Chris Smith
    0

    @Guy, did you get anywhere with the brands as I'm now running into exactly the same problem?

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Sep 08, 2023 @ 16:15
    Huw Reddick
    0

    something like this should work fine (although there is no actual way to tell if it is a brand unless you pull them into a sperate css file since they have the same naming format as any other fontawesome icon

    \.(fa-[\w-]+):
    
  • Chris Smith 39 posts 142 karma points
    Sep 11, 2023 @ 10:35
    Chris Smith
    0

    Thanks Huw. That regex in the Selector and changing the css file and rules from all.css to brands.css has done the trick.

Please Sign in or register to post replies

Write your reply to:

Draft