Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

material-icons

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

material-icons - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

css/material-icons.css

14

package.json
{
"name": "material-icons",
"version": "0.2.0",
"description": "Material design icon font",
"version": "0.2.1",
"description": "Material design icon font and CSS framework for self hosting the icons.",
"scripts": {
"build": "node-sass --output-style=expanded iconfont/material-icons.scss iconfont/material-icons.css"
"build": "npm run build:init && npm run build:iconfont && npm run build:css && npm run build:css:min",
"build:init": "node scripts/codepoints.js",
"build:iconfont": "node-sass --output-style=expanded iconfont/material-icons.scss iconfont/material-icons.css",
"build:css": "node-sass --output-style=expanded css/material-icons.scss css/material-icons.css",
"build:css:min": "node-sass --output-style=compressed css/material-icons.scss css/material-icons.min.css"
},

@@ -26,4 +30,6 @@ "devDependencies": {

"icons",
"font"
"font",
"css",
"sass"
]
}
# Material Icons
Material design icon font
Material design icon font and CSS framework for self hosting the icons.
> **Note:** This package contains only the icon font and required CSS. So it is considerably small compared to the official [material-design-icons] package and easy to install.
## Installation

@@ -13,6 +15,8 @@

## Setup
## Usage
### CSS
Font files are present in the `iconfont` directory and can be imported using CSS.
Import the required CSS:
```html

@@ -22,3 +26,3 @@ <link rel="stylesheet" href="/path/to/material-icons/iconfont/material-icons.css">

### Sass & Webpack
or import the SCSS:

@@ -31,3 +35,3 @@ ```scss

## Usage
To display an icon use:

@@ -38,2 +42,62 @@ ```html

Available Sass variables:
```scss
$material-icons-codepoints: () !default; /* Sass map of icon names and codepoints */
$material-icons-font-path: '' !default;
$material-icons-font-name: 'MaterialIcons-Regular' !default;
$material-icons-font-size: 24px !default;
$material-icons-font-family: 'Material Icons' !default;
```
Available Sass mixins:
```scss
.material-icons {
@include material-icons();
}
```
## CSS Classes (Optional)
Alternatively you can use CSS classes to display an icon.
> **Note:** This method is not recommended as it requires a large CSS file to be imported in addition to above files.
Import the required CSS:
```html
<link rel="stylesheet" href="/path/to/material-icons/css/material-icons.min.css">
```
or import the SCSS:
```scss
$material-icons-css-prefix: 'mi';
@import 'material-icons/css/material-icons.scss';
```
To display an icon use:
```html
<span class="mi mi-face"></span>
```
Available Sass variables:
```scss
$material-icons-css-prefix: 'mi' !default;
$material-icons-css-search: '_' !default;
$material-icons-css-replace: '-' !default; /* To replace '_' with '-' in CSS class names */
```
Available Sass mixins:
```scss
.mi-face {
@include material-icon('face');
}
```
## Available Icons

@@ -45,1 +109,2 @@

[material design icons]: https://material.io/icons/
[material-design-icons]: https://github.com/google/material-design-icons

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc