question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fa-duotone-icon should assume the 'fad' prefix by default

See original GitHub issue

Describe the problem

When using the duotone element, the default prefix is read by the global options when not explicitly provided.

What did you expect?

Unless specifically overridden it should infer that the icon set used for this element is “fad”. Maybe a global config to change this behaviour too, that way you can change this without it being a breaking change for users

Reproducible test case

Basic setup of angular and FA, no special extras needed


<fa-duotone-icon icon="user"></fa-duotone-icon> <!-- By default this should be using the "fad-user" icon -->
<fa-duotone-icon [icon]="['fad', 'user']"></fa-duotone-icon> <!-- Instead it has to be written like this currently, which just feels redundant -->

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
Cephyric-ghcommented, Mar 20, 2022

I wonder why do I need the fa-duotone-icon component anyway. What is the difference between <fa-duotone-icon [icon]="['fad', 'user']"></fa-duotone-icon>and <fa-icon [icon]="['fad', 'user']"></fa-icon>?

duotone icons support more options than regular icons - swapOpacity, primaryOpacity, secondaryOpacity, etc that don’t make sense to exist on the regular icon component

0reactions
DaSchTourcommented, Mar 20, 2022

I wonder why do I need the fa-duotone-icon component anyway. What is the difference between <fa-duotone-icon [icon]="['fad', 'user']"></fa-duotone-icon>and <fa-icon [icon]="['fad', 'user']"></fa-icon>?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Duotone Icons | Font Awesome Docs
Duotone icons use the same syntax Font Awesome icons and can be referenced like any other icon using their specific style prefix (...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found