quarto-ext / fontawesome

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

Possibility to specify the color? #27

Closed jozilla closed 11 months ago

jozilla commented 11 months 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 11 months 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 11 months 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 11 months ago

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

cscheid commented 11 months ago

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