Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transforms ignored on .fa-layers-text when using nest mutator #13497

Open
idpaterson opened this Issue Jul 8, 2018 · 3 comments

Comments

Projects
None yet
5 participants
@idpaterson
Copy link

commented Jul 8, 2018

The nest mutator, used when the autoReplaceSvg option is set to "nest", causes power transforms to be ignored on .fa-layers-text. The mutator ignores all attributes including the style attribute generated by makeLayersTextAbstract().

This fiddle shows the calendar example from the Font Awesome documentation. While this works properly with autoReplaceSvg: true (which uses the replace mutator), no transform is applied with autoReplaceSvg: "nest" and the numbers overlap the entire calendar icon.

<span class="fa-layers fa-3x">
  <i class="fas fa-calendar"></i>
  <span class="fa-layers-text fa-inverse" data-fa-transform="shrink-8 down-3">27</span>
</span>
Expected replace nest
correct calendar correct calendar non-transformed calendar

I have found the nest mutator very useful in upgrading an open source project from Font Awesome 4 to 5 Pro. This is certainly something that could be worked around by using the default replace mode instead, but since that would require much refactoring of old markup and CSS I am hopeful for a fix to make replace and nest mode produce the same result.

@robmadole

This comment has been minimized.

Copy link
Collaborator

commented Jul 16, 2018

@idpaterson thanks for the great bug report. I can confirm this is broken. We'll get it on the list to get fixed!

@MajorEvent

This comment has been minimized.

Copy link

commented Nov 19, 2018

Just bumping this since it's affecting me and not fixed yet. It's not affecting layering icons or the counter, just the text transform.

@Chris-KCIT

This comment has been minimized.

Copy link

commented Apr 7, 2019

Bump, looking forward to seeing this resolved, or at a minimum mentioned in the documentation if it is going to be an ongoing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.