mcanouil / quarto-iconify

Use Iconify icons in HTML-based Quarto documents (over 200,000 open source vector icons)
https://m.canouil.dev/quarto-iconify/
MIT License
107 stars 0 forks source link

add style option #12

Closed tfaureperso closed 10 months ago

tfaureperso commented 10 months ago

for example changing the color of the icon

modif to the iconify.lua file

      local style = pandoc.utils.stringify(kwargs["style"])
      if not is_empty(style) then
        attributes = attributes .. ' style="' .. style .. '"'
      end

usage example : {{< iconify icon-park-solid people style="color: #099;">}} to change the icon color

mcanouil commented 10 months ago

Thanks for the suggestion, but this does not bring much and I would like to keep the extension as close as possible to the Iconify API.

Simply use span divs if you want to style the icons:

[{{< iconify fa6-brands apple >}}]{style="color: red;"}