quarto-ext / fontawesome

Use Font Awesome icons in HTML and PDF documents.
MIT License
105 stars 10 forks source link

FR: add color argument? #23

Closed kbvernon closed 1 year ago

kbvernon commented 1 year ago

Hi, thanks for this great Quarto extension. It would be nice if we could add a color argument like so:

{{< fa brands r-project color=steelblue >}}

This has been implemented in https://github.com/schochastics/academicons and seems to work when adding the necessary lines to the lua filter for this extension. I'm happy to submit a PR to do that if you all think this is something worth adding.

Thanks!

cscheid commented 1 year ago

Is there a reason you prefer this syntax to using a wrapping span on the markdown to adjust the style? We'd like to keep extensions minimal whenever possible.

kbvernon commented 1 year ago

Do you mean something like this:

[{{< fa brands r-project >}}]{style="color:steelblue"}

I suppose that's an option, just a little verbose. If you all prefer to keep the extension minimal, though, I totally understand.

cscheid commented 1 year ago

Yes, it is a little verbose, but the reason I'm reluctant to implement your request is that color is only one of the many different CSS changes that someone might want to do, and there's already a mechanism for controlling appearance: CSS. It even enables you to control it globally, by adding a CSS rule that selects all FA icons and changes color. As it stands, adding color would only partially solve the problem, and introduce downstream confusion when people try to use other features.