forked from Dogfalo/materialize
-
-
Notifications
You must be signed in to change notification settings - Fork 109
More flexible approach on icons #376
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Activity
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Before submitting...
Context
There are a lot of options when it comes to icons. Google alone provides more than one set. Therefore, I think the approach of MaterializeCSS may need some changes.
Current Behavior
Currently the docs require this pattern for icons:
<i class="material-icons">add</i>Also CSS styles explicitly use selectors like these:
If I use
<span>instead of<i>, the output sometimes becomes broken. Also now we have Material Symbols. Some people may even want to use icons from a different source. I think it would be very good if the framework did not dictate which icons to use.Expected behavior
No response
Possible Solutions or Causes
Perhaps there could be a specific class or data attribute that must be added to any icon element? Then in CSS we would not need to list various tags and classes and it would be enough to have something like
[data-icon] {}or.materialize-icon {}Your Environment