Reputation: 1529
I'm trying to add Material.io icon to a button using ::before, but it only displays the icon filled.
There are no guides about how to set the icon outlined.
This is my code:
.view-site:before{
content: "\E8F4";
font-family: 'Material Icons';
}
How do i display the outlined icon?
Upvotes: 2
Views: 3523
Reputation: 10328
Google claim the new themes feature weeks ago but apparently there's no clue on how to use outlined, sharp, rounded and two tone icons.
I believe the only reference we got is here: https://github.com/google/material-design-icons/issues/773
Upvotes: 1
Reputation: 18099
I believe you missed the dot before the CSS rule. Here is the fixed solution:
.view-site:before {
content: "\E8F4";
font-family: 'Material Icons';
}
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<i class="view-site">
</i>
Upvotes: 0