-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
Placeholder fa-fw
doesn't work on SVG framework
#14339
Comments
fa-fw
doesn't work on SVG framework
@robmadole I think this use case is legitimate We have at least those options
I'm still personal against introducing a placeholder class in font awesome's core because it must be clear that icons have not the same width, and if you want to line-up multiple icons you have to use What do you suggest? |
Hi, @tagliala and @JoshMcCullough. Thanks for bringing this up and for the good thoughts. I'd solve this with some quick custom markup/styling on my project's end that hides the icon visually ( Here's a quick demo of the direction - https://codepen.io/fontawesome/pen/yQwwNX. @JoshMcCullough would that solve the issue and help your situation? |
@talbs Yes, of course we can add our own CSS to handle this. I simplified your example: https://codepen.io/anon/pen/xQBeoR (no need to set margin or include an icon class) That's a fine solution if this doesn't matter to many people, else adding an |
@JoshMcCullough I understand your point, but I think that
Example: <!-- Bad (Icons will not line-up, developers should avoid this) -->
<li><i class="fas fa-user"></i> Row 1</li>
<li><i class="fas fa-envelope"></i> Row 2</li>
<li><i class="fa-empty"></i> Row 3</li>
<!-- Good (icons will line-up, but `fa-empty` should be defined exactly
as `fa-fw`, provide the `display: inline-block` property missing in `fa-fw`
and used together with `fa-fw`) -->
<li><i class="fas fa-fw fa-user"></i> Row 1</li>
<li><i class="fas fa-fw fa-envelope"></i> Row 2</li>
<li><i class="fa-empty"></i> Row 3</li> |
No problem at all if you don't think it's that useful for most people, easy to handle on our own. |
@JoshMcCullough thanks for your understanding. Anyway, I would like to provide a better way for managing |
@tagliala yeah let me consider this a bit. Because an |
@robmadole we could provide an In that way, the new class would semantically complement Then, in version v6.0 we could add Fiddles: What do you think? |
Sounds good to me! |
@tagliala the SVG implementation would still show a "missing icon" symbol. 🤔 I think the proper fix is going to be making the SVG implementation match the behavior of the web fonts version. |
@tagliala |
Picture a menu with icons followed by text on each line. If we don't have an icon to use for a given menu item, we still need to have a "spacer" icon there so the text of the menu items align.
fa-fw
is a partial fix for this, but if you don't specify an icon, then the ? icon is displayed.FA5 syntax example: https://jsfiddle.net/tagliala/wks0e6pa/31/
(Brought over from issue #1606.)
The text was updated successfully, but these errors were encountered: