Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Materialize icons work? [duplicate]

There are two ways to use Materilize Icon:

  1. <i class="mdi-action-settings"></i>
  2. <i class="material-icons">settings</i>

<i class="mdi-action-settings"></i> I understand how this first method works. This works as css is defined below:

.mdi-action-settings:before {
    content: "\e672";
}

Now my question is how the second method <i class="material-icons">settings</i> works?

Here is the URL to see Materialize Icons

like image 951
Syed Avatar asked Jul 27 '15 08:07

Syed


People also ask

How do material icons work?

That's how Google's Material Icons work. The string “face” here literally turns into an icon of a face. Then we can, through the power of magical ligatures, turn that text into an icon. That happens automatically when the font-family is set to one that does ligature icons, like Material Icons.

Are Google icons free for commercial use?

Licensing. We have made these icons available for you to incorporate them into your products under the Apache License Version 2.0. Feel free to remix and re-share these icons and documentation in your products. We'd love attribution in your app's about screen, but it's not required.

Are material icons free to use?

Material Design Icons are available in five styles. The icons are crafted based on the core design principles and metrics of Material Design guidelines. Our icons are free for everyone to use. It's available under Apache license version 2.0.

How to use materialize CSS icons?

Materialize CSS contains 932 material design icons from Google. These icons can be downloaded directly from the Material Design specs. You have to put the name of the icon in the class of an HTML <i> element to use the icon. You can use the following classes to control the size of an icon.

How do I get the material design icons?

We have included 932 Material Design Icons courtesy of Google. You can download them directly from the Material Design specs. To be able to use these icons, you must include this line in the <head> portion of your HTML code

Why is materialize a single responsive platform?

Additionally, a single underlying responsive system across all platforms allow for a more unified user experience. We have provided detailed documentation as well as specific code examples to help new users get started. We are also always open to feedback and can answer any questions a user may have about Materialize.

Can I submit my own website with materialize?

Checkout what people are creating with Materialize. Get inspired by these beautiful sites and you can even submit your own website to be showcased here. Take a look at our official themes for Materialize.


1 Answers

This is something called ligatures. Take a look at this page that explains how to enable them in CSS.

Long story short, if you enable it, you tell the browser to look for letter combinations that should render in another way. An example is shown here. Some special fonts (like in materializecss or the ones you create in icomoon.io) just use this feature with words to render icons instead of combined letters. If the browser can't handle ligatures, then it gracefully falls back to the literal word, instead of an empty space.

like image 88
Sergi Juanola Avatar answered Oct 01 '22 02:10

Sergi Juanola