Copied to clipboard

Flag this post as spam?

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


  • Arjan Woldring 118 posts 224 karma points
    Nov 09, 2017 @ 08:49
    Arjan Woldring
    0

    Adding Simple Line Icons

    Hi Mario,

    First of all love your package! This is a good example of a good extensible package!

    I do have a problem with adding "Simple Line Icons". Likely I am doing something wrong because I am definitely no Regex Expert xD

    This is the css: Line Icons CSS

    This is what I added to preconfigs.json:

            {
            "name": "Simple Line Icons",
            "selector": "\\.(icon-[\\w-]+):before{",
            "template": "<i class=\"{icon}\"></i>"
        }
    

    But when adding the package on the iconic datatype it says in the chrome console: "Extracted styles are 0"

    Any help would be great! Thanks, Arjan

  • Mario 117 posts 741 karma points c-trib
    Nov 09, 2017 @ 09:23
    Mario
    100

    Hey Arjan,

    So glad you like the package :)

    You are almost there man, you are missing a space before the curly brace. The full configuration would be:

        {
          "name": "Simple Line Icons",
          "selector": "\\.(icon-[\\w-]+):before {",
          "template": "<i class=\"{icon}\"></i>"
        }
    

    If you use a minimised version remember to remove that space.

    If you don't mind I'll steal this configuration to include it in the next version of the package :P

  • Arjan Woldring 118 posts 224 karma points
    Nov 09, 2017 @ 12:40
    Arjan Woldring
    0

    Because Umbraco uses the same ".icon-" classes, all the icons in Umbraco backend are replaced with the Simple Line Icons, which looks pretty awesome but that is a side-effect which we do not want. So we need to keep in mind to use different icon class names for Icons starting with ".icon-"

  • Arjan Woldring 118 posts 224 karma points
    Nov 09, 2017 @ 12:00
    Arjan Woldring
    0

    Thank you so much! That stupid space was the solution xD

    Of course you can use the configuration for the next release!

    Keep up the good work! Cheers, Arjan

Please Sign in or register to post replies

Write your reply to:

Draft