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

Support other material icon styles #14

Open
Langstra opened this issue Aug 7, 2023 · 1 comment
Open

Support other material icon styles #14

Langstra opened this issue Aug 7, 2023 · 1 comment

Comments

@Langstra
Copy link
Contributor

Langstra commented Aug 7, 2023

Material icons are a bit weird with the types of icons they have and support. They have outlined, filled, rounded, sharp and two toned icons. However, if you use the filled type you still have an icon called Help outline.
Info outline also exists, but only for the outline type. Which is not supported in the material-icons class. You need to specify the icon like this html

<span class="material-icons-outlined">
info
</span>

It would be nice to support these different types of icons.

@rienheuver
Copy link
Contributor

Currently we import the material icons like this:

@import url("https://fonts.googleapis.com/icon?family=Material+Icons");

To import all the other styles we have to expand that to:

@import url("https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Two+Tone|Material+Icons+Round|Material+Icons+Sharp");

This will load 4 extra font files with a combined size of 680 kB, so that's not very nice. Any suggestions on how to support this properly?

One option I can come up with is to simply mention in the documentation that by default we only support the regular style. If you want to use other styles you can add an import URL in your own css, something like:

@import "@riskchallenger/open-components/main.css";
/*Add two-tone material icons */
@import url("https://fonts.googleapis.com/icon?family=Material+Icons+Two+Tone");

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