Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It would be awesome if we could easily use FA layering and masking. https://fontawesome.com/how-to-use/svg-with-js#masking and https://fontawesome.com/how-to-use/svg-with-js#layering
For masking, maybe add a checkbox to the field settings which adds a secondary autocomplete field to use as the mask?
For layers, maybe an option is to make the fontawesome field multi-value ( field storage -> Allowed number of values > 1 ), and if there is more than one field present, change the template to have the .fa-layers class on the wrapper?
Comment | File | Size | Author |
---|---|---|---|
#5 | add_support_masking_to_icon_field-2933851-5.patch | 6.19 KB | Daniel.Moberly |
Comments
Comment #2
Daniel.Moberly CreditAttribution: Daniel.Moberly commentedI think this is definitely doable. Masking for sure is simple as it follows the same sort of rules as Power Transforms, which are already included. I think we can handle layers the way you suggest by adding an option to the widget to optionally display multi-value icons as layers. I'll update here shortly.
Comment #3
Daniel.Moberly CreditAttribution: Daniel.Moberly commentedLet's change this issue to support masking only and open a child issue for layer support.
Comment #4
Daniel.Moberly CreditAttribution: Daniel.Moberly commentedUpdating title again
Comment #5
Daniel.Moberly CreditAttribution: Daniel.Moberly commentedAttaching a patch which adds masking support to the icon field.
Comment #6
scottsawyerThank you, will try the patch in a couple of hours.
Comment #8
scottsawyerWow, this works so good!! Love it!
I will test the patch on: https://www.drupal.org/project/fontawesome/issues/2934509
Comment #9
Daniel.Moberly CreditAttribution: Daniel.Moberly commented