summaryrefslogtreecommitdiff
path: root/node_modules/css-unit-converter/README.md
blob: 5ea113ef8125e6782a9aab809a2f58f9e1c65508 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# css-unit-converter [![Build Status][ci-img]][ci]

Converts CSS values from one unit to another

[PostCSS]: https://github.com/postcss/css-unit-converter
[ci-img]:  https://travis-ci.org/andyjansson/css-unit-converter.svg
[ci]:      https://travis-ci.org/andyjansson/css-unit-converter


## Installation

```js
npm install css-unit-converter
```

## Usage


```js
var convert = require('css-unit-converter');
//convert 1 inch to pc
convert(1, 'in', 'pc'); // 6

//convert 10px to cm with a maximum of 10 decimals
convert(10, 'px', 'cm', 10); // 0.2645833333
```