Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nju33/postcss-yu-gothic
Postcss plugin for Yu Gothic
https://github.com/nju33/postcss-yu-gothic
postcss yu-gothic
Last synced: about 1 month ago
JSON representation
Postcss plugin for Yu Gothic
- Host: GitHub
- URL: https://github.com/nju33/postcss-yu-gothic
- Owner: nju33
- License: mit
- Created: 2016-12-15T13:43:24.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-16T07:43:49.000Z (about 8 years ago)
- Last Synced: 2024-10-28T17:33:19.754Z (2 months ago)
- Topics: postcss, yu-gothic
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/postcss-yu-gothic
- Size: 52.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Postcss Yu Gothic
[![npm version](https://badge.fury.io/js/postcss-yu-gothic.svg)](https://badge.fury.io/js/postcss-yu-gothic)[![Build Status](https://travis-ci.org/nju33/postcss-yu-gothic.svg?branch=master)](https://travis-ci.org/nju33/postcss-yu-gothic)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)## Motivation
わざわざ游ゴシックについてグーグル検索しなくても、楽に使いたい
Do not bother to use Google Search for Gothic but want to use it comfortablyこのプラグインは[Chromeでも読みやすい游ゴシックを指定する方法](http://qiita.com/RinoTsuka/items/1e7b3ca1325e704bbc41)を参照して作られました。
This plugin was created with reference to [link](http://qiita.com/RinoTsuka/items/1e7b3ca1325e704bbc41).## Example
最初に現れた`Yu Gothic`を値に持ったセレクタの前に`@font-face`が挿入されます。
`@Font-face` is inserted before the selector whose value is` Yu Gothic` which first appeared.前...
Before...```css
body {
font: 16px / 1.5 "Yu Gothic";
}.class {
font-family: "Yu Gothic";
}```
後!!!
After!!!```css
@font-face {
font-family: "Yu Gothic";
src: local("Yu Gothic Medium");
font-weight: normal;
}@font-face {
font-family: "Yu Gothic";
src: local("Yu Gothic Bold");
font-weight: bold;
}body {
font: 16px / 1.5 "Yu Gothic";
}.class {
font-family: "Yu Gothic";
}```
## Install
```bash
$ npm i --save-dev postcss-yu-gothic
# or `yarn add --dev postcss-yu-gothic`
```## Transform with The [Postcss](https://github.com/postcss/postcss)
```js
import yuGothic from 'postcss-yu-gothic';
postcss([yuGothic])
.process(cssContent)
.then(result => {
console.log(result.css);
});```
## Option
- `weight`: default:`['medium', 'bold']`
出力する`font-weight`を指定
Specify output `font-weight`## License
MIT © nju33