# postcss-font-weight-names

> PostCSS plugin to convert commonly used font-weight names i.e. Thin, Semi Bold, Heavy, etc.. to a numeric font-weight

Latest version **1.1.0** (published 2017-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install postcss-font-weight-names
pnpm add postcss-font-weight-names
yarn add postcss-font-weight-names
bun add postcss-font-weight-names
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2017-09-24 |
| First published | 2016-04-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Dan Gamble |
| Maintainers | dangamble |
| Keywords | postcss, css, postcss-plugin, font-weight |

## Links

- npm: https://www.npmjs.com/package/postcss-font-weight-names
- Repository: https://github.com/dan-gamble/postcss-font-weight-names
- Issues: https://github.com/dan-gamble/postcss-font-weight-names/issues
- npm.io page: https://npm.io/package/postcss-font-weight-names

## Dependencies (1)

- [postcss](https://npm.io/package/postcss.md) ^5.0.16

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

- 1.1.0 (latest) — 2017-09-24
- 1.0.0 — 2016-04-10

## README

# PostCSS Font Weight Names [![Build Status][ci-img]][ci]

<img align="right" width="135" height="95"
     title="Philosopher’s stone, logo of PostCSS"
     src="http://postcss.github.io/postcss/logo-leftp.svg">

[PostCSS] plugin to convert commonly used font-weight names i.e. `Thin`, `Semi Bold`, `Heavy`, etc.. to a numeric font-weight

[PostCSS]: https://github.com/postcss/postcss
[ci-img]:  https://travis-ci.org/dan-gamble/postcss-font-weight-names.svg
[ci]:      https://travis-ci.org/dan-gamble/postcss-font-weight-names

#### Installation
```
npm install postcss-font-weight-names
```

#### Before
```css
.font-weight {
  font-weight: Semi Bold;
}
```

#### After
```css
.font-weight {
  font-weight: 600;
}
```

#### Font weight name mappings
| Name                     | Weight        |
| ------------------------ |:-------------:|
| Thin, Hairline           | 100           |
| Extra Light, Ultra Light | 200           |
| Light                    | 300           |
| Normal, Regular          | 400           |
| Medium                   | 500           |
| Semi Bold, Demi Bold     | 600           |
| Bold                     | 700           |
| Extra Bold, Ultra Bold   | 800           |
| Black, Heavy             | 900           |

You can use any of the following ways to write the names: `Semi Bold`, `semi bold`, `semi-bold`, `semi_bold`.

#### Usage

```js
postcss([ require('postcss-font-weight-names') ])
```

See [PostCSS] docs for examples for your environment.

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