Giter Site home page Giter Site logo

marella / material-icons Goto Github PK

View Code? Open in Web Editor NEW
296.0 4.0 38.0 59.38 MB

Latest icon fonts and CSS for self-hosting material design icons.

Home Page: https://marella.github.io/material-icons/demo/

License: Apache License 2.0

CSS 64.51% JavaScript 1.68% SCSS 30.67% HTML 3.14%
material-icons material-design-icons material-design iconfont icons font css sass material

material-icons's People

Contributors

brunowego avatar dependabot[bot] avatar github-actions[bot] avatar marella avatar oleksiismerdov avatar robert-w-gries avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

material-icons's Issues

Support for Material Symbols

The team at Google Fonts recently released Material Symbols, a new, much more customizable version of Material Icons.

It would be amazing if you could add support for them, by adding a second workflow looking for the latest version of Material Symbols and a separate material-symbols.css for them.

Fast copy icons element?

image

I often use icon sets to look up the icons I want when developing, but it is very inconvenient, and I need to memorize the icon names every time. It would be great if you could add a click to copy directly, I think that would be very convenient.

image

Help with mixins, icons not showing

I'm usign laravel 6 that work with webpack, i do this imports on app.scss:
//material-icons
$material-icons-font-path: '~material-icons/iconfont/';
@import '~material-icons/iconfont/material-icons.scss';
@import '~material-icons/iconfont/codepoints.scss';
@import '~material-icons/iconfont/mixins.scss';
@import '~material-icons/iconfont/variables.scss';
@import '~material-icons/css/material-icons.scss';
I add more imports than you recomend.
And then i use this to put an icon in a button, just for trying:
image
I run: npm run dev(and i use too: npm run watch), and reload deleting cache from browser and i get this:
image
The material icons when i use the span tag is working well, but when i use the mixins that happens. Can you help me please?

Missing icons (login, logout, policy, push_pin, query_states, local_fire_department)

Need to get codepoint for a specific ligature

Somewhat related to #32. I now have a need to find the codepoint for a specific icon. Would it be possible to publish codepoints.json in addition to versions.json? I think my other option is to parse the font with fontkit, which seems a bit heavy handed.

Monitoring icon is missing

Hi, thanks for this. I've just noticed the monitoring icon is missing. Would it be possible to add it?

image

Automatically generated typescript types

Hello, would you be interested in a PR that generates an index.d.ts file with each release? The codepoints.js script would be extended to parse the the_data/codepoints.json file and generate a set of types. Something like:

export type MaterialIconSet = [
  ...
  "ac_unit",
  "access_alarm",
  "access_alarms",
  "access_time",
  "access_time_filled",
  "accessibility",
  "accessibility_new",
  "accessible",
  "accessible_forward",
  "account_balance",
  "account_balance_wallet",
  "account_box",
  "account_circle",
  "account_tree",
  ...
];

export type MaterialIcons = IconSet[number];

This feature would allow typescript apps to type check/autocomplete the icon names:

// remove 'account_box' and you can autocomplete a different icon name
const iconName: MaterialIcons = 'account_box';

Customize css class

Hi,

Thanks for this library ๐Ÿ‘

Only one small thing is that class="material-icons" is quite long and I would like to customize the used css class to a shorter one.

Like this:

$material-icons-css-prefix: 'mi'; // defaults to 'material-icons'
<i class="mi">pie_chart</i>
<i class="mi-outlined">pie_chart</i>
<i class="mi-round">pie_chart</i>
<i class="mi-sharp">pie_chart</i>
<i class="mi-two-tone">pie_chart</i>

A lot of icons are not displayable

Following Icons are inside of _codepoints.scss but they are not displayable:

  • 'battery_20',
  • 'battery_30',
  • 'battery_50',
  • 'battery_60',
  • 'battery_80',
  • 'battery_90',
  • 'battery_charging_20',
  • 'battery_charging_30',
  • 'battery_charging_50',
  • 'battery_charging_60',
  • 'battery_charging_80',
  • 'battery_charging_90',
  • 'copy',
  • 'cut',
  • 'paste',
  • 'signal_cellular_0_bar',
  • 'signal_cellular_1_bar',
  • 'signal_cellular_2_bar',
  • 'signal_cellular_3_bar',
  • 'signal_cellular_4_bar',
  • 'signal_cellular_connected_no_internet_1_bar',
  • 'signal_cellular_connected_no_internet_2_bar',
  • 'signal_cellular_connected_no_internet_3_bar',
  • 'signal_wifi_1_bar',
  • 'signal_wifi_1_bar_lock',
  • 'signal_wifi_2_bar',
  • 'signal_wifi_2_bar_lock',
  • 'signal_wifi_3_bar',
  • 'signal_wifi_3_bar_lock',
  • 'signal_wifi_4_bar',
  • 'signal_wifi_connected_no_internet_0',
  • 'signal_wifi_connected_no_internet_1',
  • 'signal_wifi_connected_no_internet_2',
  • 'signal_wifi_connected_no_internet_3',
  • 'signal_wifi_statusbar_1_bar',
  • 'signal_wifi_statusbar_2_bar',
  • 'signal_wifi_statusbar_3_bar',
  • 'signal_wifi_statusbar_connected_no_internet',
  • 'signal_wifi_statusbar_connected_no_internet_1',
  • 'signal_wifi_statusbar_connected_no_internet_2',
  • 'signal_wifi_statusbar_connected_no_internet_3',
  • 'signal_wifi_statusbar_not_connected',

Thanks for your work! It seems to be the only way to use material icons via npm ๐Ÿ‘

css-loader@6 breaks building icons

When using webpack 5 and importing via js like so:

import "material-icons";

causes the build to fail to create icons in correct format.

save_alt not displaying

I was trying to use save_alt. It doesn't appear for me.

<i aria-hidden="true" aria-label="Save" class="material-icons">save_alt</i>

CSS usage doesn't work

The usage via css is currently not working.
The icons only will be displayed if I add the following (from iconfont folder) to my own css:

@font-face {
font-family: "Material Icons";
font-style: normal;
font-weight: 400;
font-display: block;
src: url("~material-icons/iconfont/material-icons.woff2") format("woff2"), url("~material-icons/iconfont/material-icons.woff") format("woff");
}
.material-icons {
font-family: "Material Icons";
font-weight: normal;
font-style: normal;
font-size: 24px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
font-feature-settings: "liga";
}

this I have to do for each style (outlined, etc.)

is this the wanted behaviour? then it should be mentioned in the docs.

How to use outlined icons

I have this line
<i class="material-icons-outlined shopping-cart">shopping_cart</i>
i also try
<i class="material-icons shopping-cart">shopping_cart_outline</i>
(dont pay attention to the shopping cart class, just for positionning)

Thanks for help !

Missing icon: shortcut

Hi there!

Just wanted to let you know that there is icon which I can see in the demo , but is missing in the files (I don't see it in the scss), and respectively can't be used. The icon is shortcut.

Cheers!

Files missing in the bundle

Hey,
first of all, thank you very much for this library, it has been very useful to me for quite a while!

This morning I tried upgrading to the latest 0.5.0 version and got hit by a build error:

NonErrorEmittedError: (Emitted value instead of an instance of Error) CssSyntaxError: C.\path\to\my\project\node_modules\material-icons\iconfont\material-icons.css:77:262:: Can't resolve 'MaterialIconsTwoTone-Regular.ttf' in 'C.\path\to\my\project\node_modules\material-icons\iconfont

It seems like the stylesheet is trying to include all kinds of versions of the newly added fonts, but not all of them are part of the bundle. The missing files are:

  • MaterialIcons-Regular.otf
  • MaterialIconsTwoTone-Regular.ttf
  • MaterialIconsSharp-Regular.ttf
  • MaterialIconsRound-Regular.ttf
  • MaterialIconsOutlined-Regular.ttf

Removing all of these results in a functioning build, but would require manually editing the source material-icons.css file. I wouldn't recommend it, I just wanted to mention it as a temporary workaround for anyone reading this.

Thank you!

Where's the actual font file?

There is a reference to

font-family: 'Material Icons';

but the font does not seem to be included in the npm package.

Publish codepoints/versions.json?

I'm interested in creating an icon picker using this package, but I'd really like to have a list of icons available so I don't need to copy the list and keep it updated. Would it be possible to publish codepoints.json and/or versions.json to npm?

Autosize

The icons are a static font size (24px), this causes problems with some frameworks like bootstrap 5 when integrating predefined sizing styles like display-1 which works with pixel points or rem and not pixels directly. There should be a setting or style sheet that overrides the size of icons to the document's default size, so each person could be free to use whatever size they want across different frameworks without resorting to manual declarations in style sheets overriding the values.

Please, remove font-size declarations from the css file or add a separated css without predefined size.

The fix for me adding new css rule in custom css file (ugly but useful):

.custom-material-icons-round {
    font-family: "Material Icons Round";
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "liga";
}

Same as original but without font size and using new class name.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.