Change a custom SVG Icon Colour inside Elementor using Simple HTML

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024

Комментарии • 22

  • @websquadron
    @websquadron  3 года назад +5

    -- UPDATE -- You can now set the colour to use the Global Colour!!!
    Instead of fill="FFFFFF"
    Use fill="var( --e-global-color-accent)"
    Or fill="var( --e-global-color-primary)"
    Or fill = fill="var( --e-global-color-secondary)"

    • @AreStegane_Orgbrain
      @AreStegane_Orgbrain Год назад

      I changed this code to "var( --e-global-color)" which enables me to choose all the global colours. Not just the accent colour. By the way, I did this for a bunch of Google Material Design icons which I uploaded to Wordpress (Elementor), and it works perfectly.

  • @j.alejandroglez
    @j.alejandroglez Год назад +3

    If you delete the fill line now will be able to edit it directly from Elementor

    • @nextexitgraff
      @nextexitgraff 8 месяцев назад +1

      jeeeez, took me years to finally learn this simple task, thank you!

  • @liaqatnasim708
    @liaqatnasim708 Год назад

    You saved me once again☺... I was looking for "how to set SVG position in Centre" ..... THNAKS 👍

  • @franktielemans6624
    @franktielemans6624 3 года назад +2

    You can change svg color/size with the settings when you import it as a custom icon font. But thats a whole different approach.

  • @nigelhancock3580
    @nigelhancock3580 3 года назад +3

    Hey, that was quick! ;) So, a lot of it is down to how the SVG is created. In your robot example, it's all about the "fill" but, if there are strokes/paths it all gets more complicated! In your example, just try removing the "fill='#fgfgggg'" altogether and see if you're then able to change the colour in Elementor - you'd need to edit the code in notepad or whatever rather than use the HTML widget - that was clever btw!

    • @websquadron
      @websquadron  3 года назад +1

      Indeed - looking into that :)

  • @plastique45
    @plastique45 3 года назад +2

    This is how Elementor SHOULD process svg. Not as image files, but as a text file. It should then change the fill color, size etc for you as you play with the sliders.

    • @nigelhancock3580
      @nigelhancock3580 3 года назад +1

      Errmm ... Elementor does process SVG as SVG and not as an image. The exception to that rule would only be if a raster image was embedded in the SVG which does happen if, say, a user grabs a jpg and somehow finds a "convert to SVG" tool. In that case, the image isn't converted, as such, simply given an SVG wrapper. In this way, some SVG files can be accidentally mahoosive!

  • @NOALNOM
    @NOALNOM 2 года назад +2

    I tried uploading and svg exported with Adobe Illustrator. BUT Illustrator svg export with inline styles, SO only have to Remove this line opening the svg file in notepad:
    .st0{fill:#1CAAB8;} .st1{fill:#FCFCFC;}
    and removed all class tags from paths
    class="st1"
    ¡THEN you can upload the svg to Elementor and change color as you need, super cool!

    • @JubranZakri
      @JubranZakri Год назад +1

      This worked great for me, thanks

  • @frededed
    @frededed 4 месяца назад

    Thanks for this video... i was able to fix it with fill="inherit" for an icon in a button where i want it to change color on hover along with the text

  • @702Pros
    @702Pros Год назад

    You can use color change if you upload as a plain svg. Not sure how you made this. In my situation, I use inkscape which adds additional class layers, this prevents elementor from updating the fill. However, if I save it as a plain SVG Elementor will allow you to update the fill. Hope this helps. I believe the same goes for Illustrator SVGs.

  • @patrik.knutsson
    @patrik.knutsson Год назад

    Thanks! Do you have any idea of how to do this working with Product Images in WooCommerce?