# postcss-modular-scale

> PostCSS plugin for incorporating modular scale units in your styles.

Latest version **2.5.2** (published 2016-03-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install postcss-modular-scale
pnpm add postcss-modular-scale
yarn add postcss-modular-scale
bun add postcss-modular-scale
```

## 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 | 2.5.2 |
| Published | 2016-03-31 |
| First published | 2015-04-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 53 |
| Author | Kristofer Joseph |
| Maintainers | dam |
| Keywords | postcss, css, postcss-plugin, modular scale, modular, scale |

## Links

- npm: https://www.npmjs.com/package/postcss-modular-scale
- Repository: https://github.com/kristoferjoseph/postcss-modular-scale
- Issues: https://github.com/kristoferjoseph/postcss-modular-scale/issues
- npm.io page: https://npm.io/package/postcss-modular-scale

## Dependencies (2)

- [postcss](https://npm.io/package/postcss.md) ^5.0.2
- [modular-scale](https://npm.io/package/modular-scale.md) ^4.4.1

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

- 2.5.2 (latest) — 2016-03-31
- 2.5.1 — 2015-10-16
- 2.5.0 — 2015-10-16
- 2.4.1 — 2015-10-08
- 2.4.0 — 2015-05-27
- 2.3.0 — 2015-04-29
- 2.2.0 — 2015-04-29
- 2.1.0 — 2015-04-29
- 2.0.0 — 2015-04-29
- 1.0.0 — 2015-04-29

## README

PostCSS Modular Scale
=====================

A plugin to provide a modular scale function in your styles.

Install
-------

`npm install postcss-modular-scale`

Usage
-----

> To generate relative values use target / base font size

   Example:

    1 = 16px ( target ) / 16px ( base font size )
    0.75 = 12px ( target ) / 16px ( base font size )
    Generates `em` or `rem` relative values

### Input

```css
:root {
  --ms-bases: 1, 0.75;
  --ms-ratios: 2;
}

.header {
  font-size: ms(4)rem;
}

```

### Output

```css
:root {
  --ms-bases: 1, 0.75;
  --ms-ratios: 2;
}

.header {
  font-size: 3rem;
}
```
Mad props
--------

Tons of thanks to Scott Kellum @scottkellum & Tim Brown @nicewebtype for making [Modular Scale](http://www.modularscale.com) and the libraries that make this plugin possible.

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