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: default size #294

Open
3 tasks done
Waterstraal opened this issue Feb 8, 2021 · 2 comments
Open
3 tasks done

Feature request: default size #294

Waterstraal opened this issue Feb 8, 2021 · 2 comments

Comments

@Waterstraal
Copy link

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

Currently you can set a defaultPrefix and fixedWidth in FaConfig:

export class AppModule {
  constructor(faConfig: FaConfig) {
    faConfig.fixedWidth = true;
    faConfig.defaultPrefix = 'far';
  }
}

I would like to set a default size as well, so that I don't have to specify it for each individual icon.
I can also imagine that it would be nice to be able to set a default for each existing fa-icon property.

Is this in relation to an existing part of angular-fontawesome or something new?

Yes, FaConfig

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

Extend FaConfig with a defaultSize property, and possibly with all the other fa-icon properties as well.

Why would other angular-fontawesome users care about this?

It would make them more efficient & their codebase cleaner.

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

10

Feature request checklist

  • This is a single feature (i.e. not a re-write of all of Font Awesome)
  • The title starts with "Feature request: " and is followed by a clear feature name (Ex: Feature request: moar cowbell)
  • I have searched for existing issues and to the best of my knowledge this is not a duplicate
@devoto13
Copy link
Collaborator

By default, the icon should match the font size of the place where it is added. I wonder why you need to change it? Can you describe your use case in more detail?

Extend FaConfig with a defaultSize property, and possibly with all the other fa-icon properties as well.

I think it is better to evaluate default properties case by case and decide if we want to implement them. The size is present in multiple components, I wonder if we should implement defaults per-component, single flag for all, or both. Per-component defaults should also be useful for #295.

@Waterstraal
Copy link
Author

Waterstraal commented Feb 16, 2021

Can you describe your use case in more detail?

I like the "lg" size (top) better than the default size (bottom):
image

I think it is better to evaluate default properties case by case and decide if we want to implement them. The size is present in multiple components, I wonder if we should implement defaults per-component, single flag for all, or both. Per-component defaults should also be useful for #295.

I think it makes sense to support a hierarchy of defaults where the lowest defined prop takes precedence: root > per component type > individual component

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

No branches or pull requests

2 participants