# postcss-font-variant

> PostCSS plugin to transform W3C font-variant properties to more compatible CSS (font-feature-settings)

Latest version **5.0.0** (published 2021-01-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install postcss-font-variant
pnpm add postcss-font-variant
yarn add postcss-font-variant
bun add postcss-font-variant
```

## Health

**Score 33/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 5.0.0 |
| Published | 2021-01-12 |
| First published | 2014-11-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/postcss-font-variant) |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 24 |
| Author | Maxime Thirouin |
| Maintainers | moox, semigradsky, jonathantneal |
| Keywords | css, postcss, postcss-plugin, font, variant, font-variant |

## Links

- npm: https://www.npmjs.com/package/postcss-font-variant
- Repository: https://github.com/postcss/postcss-font-variant
- Homepage: https://github.com/postcss/postcss-font-variant#readme
- Issues: https://github.com/postcss/postcss-font-variant/issues
- npm.io page: https://npm.io/package/postcss-font-variant

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 5.0.0 (latest) — 2021-01-12
- 4.0.1 — 2020-10-28
- 4.0.0 — 2018-09-18
- 3.0.0 — 2017-05-11
- 2.0.1 — 2016-07-08
- 2.0.0 — 2015-09-08
- 1.2.0 — 2015-08-13
- 1.1.0 — 2015-01-29
- 1.0.2 — 2015-01-27
- 1.0.1 — 2014-11-11
- 1.0.0 — 2014-11-09

## README

# 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/)

[![CSS Status](https://cssdb.org/badge/font-variant-property.svg)](https://cssdb.org/#font-variant-property)
[![Build Status](https://travis-ci.org/postcss/postcss-font-variant.svg)](https://travis-ci.org/postcss/postcss-font-variant)

PostCSS Font-Variant lets you use `font-variant` in CSS, following the
[CSS Fonts](https://www.w3.org/TR/css-fonts-3/#font-variant-prop) specification.

## Installation

```console
$ npm install postcss-font-variant
```

## Usage

```js
// dependencies
var postcss = require("postcss")
var fontVariant = require("postcss-font-variant")

// css to be processed
var css = fs.readFileSync("input.css", "utf8")

// process css using postcss-font-variant
var out = postcss()
  .use(fontVariant())
  .process(css)
  .css
```

Using this `input.css`:

```css
h2 {
  font-variant-caps: small-caps;
}

table {
  font-variant-numeric: lining-nums;
}
```

you will get:

```css
h2 {
  font-feature-settings: "smcp";
  font-variant-caps: small-caps;
}

table {
  font-feature-settings: "lnum";
  font-variant-numeric: lining-nums;
}

```

Checkout [tests](test) for more examples.

---

## Contributing

Work on a branch, install dev-dependencies, respect coding style & run tests before submitting a bug fix or a feature.

    $ git clone https://github.com/postcss/postcss-font-variant.git
    $ git checkout -b patch-1
    $ npm install
    $ npm test

## [Changelog](CHANGELOG.md)

## [License](LICENSE)

---
_Source: https://npm.io/package/postcss-font-variant · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
