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]
- Host: GitHub
- URL: https://github.com/fantasyui-com/web-fonts
- Owner: fantasyui-com
- License: gpl-3.0
- Created: 2017-07-25T16:14:15.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-11-18T20:16:11.000Z (over 1 year ago)
- Last Synced: 2024-12-14T11:49:13.066Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 59.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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',
}
```