Skip to content

PostCSS web font injector (PostCSS plugin). [Library, CSS, PostCSS]

License

Notifications You must be signed in to change notification settings

fantasyui-com/web-fonts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

PostCSS web font injector (PostCSS plugin). [Library, CSS, PostCSS]

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published