source: trip-planner-front/node_modules/postcss-font-variant/README.md@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.6 KB
Line 
1# PostCSS Font-Variant [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">](https://github.com/postcss/postcss/)
2
3[![CSS Status](https://cssdb.org/badge/font-variant-property.svg)](https://cssdb.org/#font-variant-property)
4[![Build Status](https://travis-ci.org/postcss/postcss-font-variant.svg)](https://travis-ci.org/postcss/postcss-font-variant)
5
6PostCSS Font-Variant lets you use `font-variant` in CSS, following the
7[CSS Fonts](https://www.w3.org/TR/css-fonts-3/#font-variant-prop) specification.
8
9## Installation
10
11```console
12$ npm install postcss-font-variant
13```
14
15## Usage
16
17```js
18// dependencies
19var postcss = require("postcss")
20var fontVariant = require("postcss-font-variant")
21
22// css to be processed
23var css = fs.readFileSync("input.css", "utf8")
24
25// process css using postcss-font-variant
26var out = postcss()
27 .use(fontVariant())
28 .process(css)
29 .css
30```
31
32Using this `input.css`:
33
34```css
35h2 {
36 font-variant-caps: small-caps;
37}
38
39table {
40 font-variant-numeric: lining-nums;
41}
42```
43
44you will get:
45
46```css
47h2 {
48 font-feature-settings: "smcp";
49 font-variant-caps: small-caps;
50}
51
52table {
53 font-feature-settings: "lnum";
54 font-variant-numeric: lining-nums;
55}
56
57```
58
59Checkout [tests](test) for more examples.
60
61---
62
63## Contributing
64
65Work on a branch, install dev-dependencies, respect coding style & run tests before submitting a bug fix or a feature.
66
67 $ git clone https://github.com/postcss/postcss-font-variant.git
68 $ git checkout -b patch-1
69 $ npm install
70 $ npm test
71
72## [Changelog](CHANGELOG.md)
73
74## [License](LICENSE)
Note: See TracBrowser for help on using the repository browser.