web-fonts

1.26.0 • Public • Published

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',
}

Readme

Keywords

none

Package Sidebar

Install

npm i web-fonts

Weekly Downloads

62

Version

1.26.0

License

ISC

Unpacked Size

34.1 kB

Total Files

4

Last publish

Collaborators

  • fantasyui.com