An open API service indexing awesome lists of open source software.

https://github.com/fantasyui-com/web-fonts

PostCSS web font injector (PostCSS plugin). [Library, CSS, PostCSS]
https://github.com/fantasyui-com/web-fonts

Last synced: 9 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# web-fonts
PostCSS web font injector (PostCSS plugin)

## Installation

```Bash

npm i web-fonts

```

## Usage

```JavaScript

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.

```JavaScript

{
import: "url('https://fonts.googleapis.com/css?family=Roboto')",
family: "'Roboto', sans-serif",
selector: 'html, input, button',
}

```