kartik-v / yii2-icons

Set of icon frameworks for easy use in Yii Framework 2.0
http://demos.krajee.com/icons
Other
71 stars 29 forks source link

Adding support for Font Awesome 5 #34

Closed pxao02 closed 6 years ago

pxao02 commented 6 years ago

Prerequisites

Matched all prerequisites.

The feature request

Current implementation of yii2-icons does not support the new Font Awesome 5, since the former "fa" class is replaced with "fas", "far", "fal" or "fab". While FA4 would suffice for some, the new SVG functionalities like transforming, masking and layering make it a worthwile set to use. In other words: perhaps it would be a good idea to include FA5 support in yii2-icons.

Issues to address

yii2-icons provides most features as is including transforming and masking; however, the following issues persist:

  1. Font Awesome 5 comes in Free and Pro (subscriber) versions;
  2. Font Awesome package does not update beyond 4.7;
  3. "fa" class is replaced by "fas", "far", "fal" or "fab";
  4. The new layering system makes for multiple icons stacking together, making the showStack method unsuitable.

Proposed enhancement

Pull request

I will add a pull request shortly for my changes for this enhancement. Please note that I'm a newbie on GIT and collaborating. I just made the changes, commented them where appropriate but did not change any versioning information in the files itself. Please review the code and add this where necessary. Also, please let me know if there's anything I can learn.