quarto-ext / fontawesome

Use Font Awesome icons in HTML and PDF documents.
https://quarto-ext.github.io/fontawesome/
MIT License
109 stars 10 forks source link

Possibility to specify the color? #27

Closed jozilla closed 1 year ago

jozilla commented 1 year ago

Is it possible to specify the colour for the FontAwesome icon? It would also be cool if it would be possible to use the Bootstrap primary color by default or at least make that an option as well as custom colors (like "red").

jozilla commented 1 year ago

I figured out it's possible by defining a span, but it would be great if it can be done in the shorthand code directly:

[{{< fa brands linkedin >}}]{style="color: red;"}

cscheid commented 1 year ago

it would be great if it can be done in the shorthand code directly

I don't think it's possible to do that across formats. (It would work for the predefined formats, but it wouldn't work for custom formats). The span solution makes it clear that the result will only work for HTML, so I think that's the only correct solution right now.

jozilla commented 1 year ago

OK, that makes sense, thanks. The reason I asked was because this is a feature in the academicons extension.

cscheid commented 1 year ago

@jozilla I see! The issue is that I believe they don't support other formats besides HTML, and we need to.