getgrav / getgrav/grav-plugin-shortcode-core
Font Awesome shortcode has some non-obvious behaviours
- Dominant language
- PHP
- Stars
- 47
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
I've identified a few potential issues with the Font Awesome shortcode. Once I've had some feedback from you with regard to the desired behaviour, I will put together a PR that fixes them and adds support for the new duotone icons. If you would prefer each part of this as a separate PR, just let me know.
## `extras` prepends `fa-`
Currently the README only includes examples where classes in `extras` start with `fa-`, with the exception of `margin-bottom`, however `fa-margin-bottom` does not appear to be a standard FA class. This implies both that it's necessary to give the full class name for FA classes, and that arbitrary classes can be specified here. Obviously, the documentation should be updated to reflect the functionality.
Changing the current behaviour of `extras` is obviously impractical, just in case someone is using the shortcut, but should we add an additional option for including non-FA classes?
## FA5 support is disabled by default
It was noted in #46 that there are some compatibility issues between FA4 and FA5, and so when support for FA5 was added in #56, it was set to be disabled by default. Currently, the only effect of this option is to set the style (`$fa_class`) to `fas`, `far`, `fal`, or `fab` if those are entered in `extras`. I'm unable to think of any realistic situation where this behaviour would be an issue for FA4 users, particularly since they would need to be explicitly included by the user (eg. they would have to add `extras=fas` with the intention of getting the class `fa-fas`).
Does support for FA5 really need to be disabled by default?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.