# compass-vertical-rhythm

> A port-in-progress of the Compass vertical rhythm library

Latest version **1.4.5** (published 2018-04-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install compass-vertical-rhythm
pnpm add compass-vertical-rhythm
yarn add compass-vertical-rhythm
bun add compass-vertical-rhythm
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.5 |
| Published | 2018-04-27 |
| First published | 2015-02-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/compass-vertical-rhythm) |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 553.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | Kyle Mathews |
| Maintainers | kylemathews |
| Keywords | sass, compass, vertical-rhythm, css, typography |

## Links

- npm: https://www.npmjs.com/package/compass-vertical-rhythm
- Repository: https://github.com/KyleAMathews/vertical-rhythm
- Issues: https://github.com/KyleAMathews/vertical-rhythm/issues
- npm.io page: https://npm.io/package/compass-vertical-rhythm

## Dependencies (3)

- [parse-unit](https://npm.io/package/parse-unit.md) ^1.0.1
- [object-assign](https://npm.io/package/object-assign.md) ^4.1.0
- [convert-css-length](https://npm.io/package/convert-css-length.md) ^1.0.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

- 1.4.5 (latest) — 2018-04-27
- 1.4.4 — 2018-04-27
- 1.4.3 — 2018-04-24
- 1.4.0 — 2018-01-21
- 1.3.1 — 2016-08-18
- 1.3.0 — 2016-08-16
- 1.2.1 — 2016-06-28
- 1.2.0 — 2015-03-07
- 1.1.0 — 2015-03-05
- 1.0.0 — 2015-02-11

## README

# compass-vertical-rhythm
A port-in-progress of the [Compass vertical rhythm
library](http://compass-style.org/reference/compass/typography/vertical_rhythm/).

Only the rhythm function has been ported atm.

## Install
`npm install compass-vertical-rhythm`

## Usage
```javascript
var VerticalRhythm = require('compass-vertical-rhythm');

var rhythm = VerticalRhythm({baseFontSize: '24px', baseLineHeight: 1.5}).rhythm;

rhythm(1);
// ---> 1.25rem

rhythm(0.5);
// ---> 0.625rem

rhythm(0.25);
// ---> 0.3125rem

// Use it for React inline styles.
React.createClass({
  render: function() {
    <div style={{margin: rhythm(1)}}>
      Hello world
    </div>
  }
});
```

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