Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yordis/postcss-google-font
PostCSS plugin for import Google fonts
https://github.com/yordis/postcss-google-font
font google-fonts postcss postcss-google-font
Last synced: 12 days ago
JSON representation
PostCSS plugin for import Google fonts
- Host: GitHub
- URL: https://github.com/yordis/postcss-google-font
- Owner: yordis
- License: mit
- Created: 2016-01-19T13:01:43.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-01-19T20:54:31.000Z (about 1 year ago)
- Last Synced: 2024-04-14T22:24:16.938Z (9 months ago)
- Topics: font, google-fonts, postcss, postcss-google-font
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/postcss-google-font
- Size: 1.05 MB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# PostCSS Google Font
[PostCSS] plugin for import Google fonts.
**Syntax:** `@google-font font-family styles [args]`
- **font-family**: The name of the font. **Compound family names** should
be wrapped out inside quotes or double quotes
- **styles**: The styles of the font. Use the comma for separated multiples
styles: `400,500,700italic`
- **args** (optional): The dislpay and subset of the font:
`display=swap,subset=latin|latin-ext````css
@google-font Lato 400 subset=latin;
@google-font Lato 400 display=swap,subset=latin|latin-ext;
``````css
@import url(https://fonts.googleapis.com/css?family=Lato:400?subset=latin);
@import url(https://fonts.googleapis.com/css?family=Lato:400?display=swap&subset=latin,latin-ext);
```## Usage
```js
postcss([ require('postcss-google-font') ])
```See [PostCSS] docs for examples for your environment.
[PostCSS]: https://github.com/postcss/postcss
[ci-img]: https://travis-ci.org/yordis/postcss-google-font.svg
[ci]: https://travis-ci.org/yordis/postcss-google-font