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

Feature request: A class name for missing icons #13152

Open
itayganor opened this issue May 15, 2018 · 0 comments
Open

Feature request: A class name for missing icons #13152

itayganor opened this issue May 15, 2018 · 0 comments

Comments

@itayganor
Copy link

Describe the problem you'd like to see solved or task you'd like to see made easier

I wish to hide the following missing identifier:
missing icon animation
My simplest solution for it (using the SVG with JS framework) is to add a class, fa-missing-icon or something, when the icon is missing.

Is this in relation to an existing part of Font Awesome or something new?

It supposed to be really simple and obvious, as the function findIcon() already throws an exception for missing icons.

What is 1 thing that we can do when building this feature that will guarantee that it is awesome?

Only add the class name to the icon, so I could target it through CSS and apply display: none; on it.

Why would other Font Awesome users care about this?

I let users on my website choose their own representing icon, and they may choose a brand icon which uses a different prefix than normal icons. My plan is to generate two icons with the following template:
$custom_icon_template_1 = "<i class='fal fa-$custom_icon'></i>";
$custom_icon_template_2 = "<i class='fab fa-$custom_icon'></i>";
and then apply display: none; to the missing icon. That way there will always be a present icon.

On a scale of 1 (sometime in the future) to 10 (absolutely right now), how soon would you recommend we make this feature?

  1. I think this feature is too simple to postpone, but it's just me 😉

Feature request checklist

  • [ V ] This is a single feature.
  • [ V ] The title starts with "Feature request: " and is followed by a clear feature name.
  • [ V ] I have searched for existing issues and to the best of my knowledge this is not a duplicate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants