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

fa-stack renders blank, but removing wrapper renders icons #177

Closed
MrSuttonmann opened this issue Sep 10, 2019 · 4 comments · Fixed by #285
Closed

fa-stack renders blank, but removing wrapper renders icons #177

MrSuttonmann opened this issue Sep 10, 2019 · 4 comments · Fixed by #285

Comments

@MrSuttonmann
Copy link
Contributor

I want to display an icon stack on my page, so this is what I have:

<fa-stack>
  <fa-icon [icon]="['fal', 'lock']"></fa-icon>
  <fa-icon [icon]="['fal', 'ban']"></fa-icon>
</fa-stack>

However, this renders completely empty:
image
image

If I remove the <fa-stack> wrapper, the icons render:
image
image

My implementation as I understand it is completely in-line with the documentation provided, so is this a bug or am I doing something wrong?

I'm running on Angular 8.2.3.
Font Awesome versions:
image

@devoto13
Copy link
Collaborator

devoto13 commented Sep 10, 2019

stackItemSize property is required.

Somehow I've expected this issue to come up... Let's keep this issue open to implement a check for missing stackItemSize directive and also update the referenced documentation to mention that the property is required.

@MrSuttonmann
Copy link
Contributor Author

@devoto13 Ah. That's not so obvious from the documentation, I would have assumed default to have been '1x'.

Either an error if it's missing or a default of '1x' would be useful, rather than rendering nothing.

@devoto13
Copy link
Collaborator

@plinkpaste Sorry about that. Can you submit a PR to mention in the documentation that the stackItemSize property is required? This will be useful until we implement the actual error checking.

PS Unfortunately we can't make this a default, because it is a separate directive, which adds extra logic for the icon component and therefore needs to be added explicitly.

@MrSuttonmann
Copy link
Contributor Author

@devoto13 Sure, I can do that.

@devoto13 devoto13 added this to the 0.6.0 milestone Sep 10, 2019
@devoto13 devoto13 removed this from the 0.6.0 milestone Feb 29, 2020
devoto13 added a commit to devoto13/angular-fontawesome that referenced this issue Dec 11, 2020
Previously we would silently drop elements without stackItemSize, which was confusing to users.

With this change we also stop making assumptions about the passed elements to prevent issues like FortAwesome#283, but in fa-stack.

Fixes FortAwesome#177
devoto13 added a commit that referenced this issue Dec 11, 2020
Previously we would silently drop elements without stackItemSize, which was confusing to users.

With this change we also stop making assumptions about the passed elements to prevent issues like #283, but in fa-stack.

Fixes #177
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants