Merge pull request #6282 from mermaid-js/saurabh/refactor-fontawesome-icon-usage

Refactor fontawesome icon usage.
This commit is contained in:
Sidharth Vinod
2025-04-20 01:04:40 -07:00
committed by GitHub
23 changed files with 228 additions and 59 deletions

View File

@@ -1950,6 +1950,19 @@ flowchart TD
B-->E(A fa:fa-camera-retro perhaps?)
```
There are two ways to display these FontAwesome icons:
### Register FontAwesome icon packs (v\<MERMAID_RELEASE_VERSION>+)
You can register your own FontAwesome icon pack following the ["Registering icon packs" instructions](../config/icons.md).
Supported prefixes: `fa`, `fab`, `fas`, `far`, `fal`, `fad`.
> **Note**
> Note that it will fall back to FontAwesome CSS if FontAwesome packs are not registered.
### Register FontAwesome CSS
Mermaid supports Font Awesome if the CSS is included on the website.
Mermaid does not have any restriction on the version of Font Awesome that can be used.