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

postcss-material-icons

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-material-icons

PostCSS plugin that imports icons from google's material design icon library

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

postcss-material-icons Build Status

PostCSS plugin that imports icons google's material design icon library

Install

$ npm install --save postcss-material-icons

Usage

const material = require('postcss-material-icons');

const css = 'body {background: material(face, white, 18)}';

//Use stand-alone:
material.process(css).then(res => console.log(res.css));
//=> 'body {background: url(/* base64-encoded white face icon */)}'

// Or as PostCSS plugin:
postcss([material()]).process(css).then(res => console.log(res.css));
//=> 'body {background: url(/* base64-encoded white face icon */)}'

Icons are being cached in the file system, so you won't download them twice.

CSS API

The plugin transforms material() into base64 encoded icon inside url() notation.

material(icon, [color], [size])

icon

Required

Icon name in the library:

.cart {
	background-image: material(shopping cart);
}

Yeah, without quotes and with whitespaces!

color

Default: black

Icon color. Either black or white.

size

Default: 24

Icon size in pixels. 18, 24, 36 or 48.

License

MIT © Dmitriy Sobolev

Keywords

FAQs

Package last updated on 04 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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