web-fonts
v1.26.0
Published
PostCSS web font injector (PostCSS plugin)
Downloads
82
Readme
web-fonts
PostCSS web font injector (PostCSS plugin)
Installation
npm i web-fonts
Usage
const postcss = require('postcss');
const webfonts = require('web-fonts');
const specification = {
import: "url('https://fonts.googleapis.com/css?family=Roboto')",
family: "'Roboto', sans-serif",
selector: 'html, input, button',
};
postcss([ precss, webfonts(specification) ]).process...
Developers
Options object example.
{
import: "url('https://fonts.googleapis.com/css?family=Roboto')",
family: "'Roboto', sans-serif",
selector: 'html, input, button',
}