Open zunamo opened 5 years ago
This is another option to solve this problem: https://stackoverflow.com/questions/37281861/how-to-use-google-material-icons-as-class-instead-of-i-tag
I am thinking of going with this now:
HTML:
<mdc-icon attr.data-icon="search"></mdc-icon>
CSS:
mdc-icon::after { content: attr(data-icon); }
Could you let me know if this is something you are thinking of implementing? If not, I will just change all my mdc-icons to work in this manner.
@zunamo Thank you for bringing this to my attention. I'm preparing to publish our v1.0.0 release, but afterwards I'd like to investigate this for ya.
Material icon font names are getting indexed by search engines.
The issue is described here: https://github.com/google/material-design-icons/issues/498
This template in my app:
<mdc-icon>format_list_bulleted</mdc-icon> <span>Compare</span>
Is getting translated in this manner in google search results:
In one of the answers in the link above, it is suggested to use material icon codepoints. Would it be possible to add a way to automatically translate mdc-icon font text to a code point?
Suggestion:
<mdc-icon useCodePoint>search</mdc-icon>
or<mdc-icon toCodePoint="search"></mdc-icon>
Or a different solution that would solve this issue would also be great. Thanks in advance!