You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> [PostCSS](https://github.com/postcss/postcss) plugin to reduce `calc()`.
3
+
[![NPM Version][npm-img]][npm-url]
4
+
[![Build Status][cli-img]][cli-url]
5
+
[![Support Chat][git-img]][git-url]
4
6
5
-
This plugin reduce `calc()` references whenever it's possible.
6
-
This can be particularly useful with the [postcss-custom-properties](https://github.com/postcss/postcss-custom-properties) plugin.
7
+
[PostCSS Calc] lets you reduce `calc()` references whenever it's possible. This
8
+
can be particularly useful with the [PostCSS Custom Properties] plugin.
7
9
8
-
**Note:** When multiple units are mixed together in the same expression, the `calc()` statement is left as is, to fallback to the [w3c calc() feature](http://www.w3.org/TR/css3-values/#calc).
10
+
When multiple units are mixed together in the same expression, the `calc()`
11
+
statement is left as is, to fallback to the [W3C calc() implementation].
9
12
10
13
## Installation
11
14
12
-
```console
13
-
$ npm install postcss-calc
15
+
```bash
16
+
npm install postcss-calc
14
17
```
15
18
16
19
## Usage
@@ -31,7 +34,7 @@ var output = postcss()
31
34
.css
32
35
```
33
36
34
-
**Example** (with [postcss-custom-properties](https://github.com/postcss/postcss-custom-properties) enabled as well):
37
+
**Example** (with [PostCSS Custom Properties] enabled as well):
35
38
36
39
```js
37
40
// dependencies
@@ -86,7 +89,7 @@ h1 {
86
89
}
87
90
```
88
91
89
-
Checkout [tests](src/__tests__/index.js) for more examples.
92
+
Checkout [tests] for more examples.
90
93
91
94
### Options
92
95
@@ -103,7 +106,8 @@ var out = postcss()
103
106
104
107
#### `preserve` (default: `false`)
105
108
106
-
Allow you to preserve calc() usage in output so browsers will handle decimal precision themselves.
109
+
Allow you to preserve calc() usage in output so browsers will handle decimal
0 commit comments