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
Copy file name to clipboardExpand all lines: README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,6 +116,19 @@ var out = postcss()
116
116
.css
117
117
```
118
118
119
+
#### `allowRounding` (default: `true`)
120
+
121
+
With this variable set `true`, `calc(100% / 3)` will output `33.33333%` (with `precision: 5`). If it is set `false` it will remain `calc(100% / 3)`.
122
+
123
+
Another example with `allowRounding: false`: `calc(900% / 16)` will output `56.25%` with `precision: 5` (because `calc(900% / 16)` == `56.25%`), but `calc(900% / 16)` with `precision: 0` (because `calc(900% / 16)` != `56%`).
124
+
125
+
```js
126
+
var out =postcss()
127
+
.use(calc({allowRounding:false}))
128
+
.process(css)
129
+
.css
130
+
```
131
+
119
132
#### `warnWhenCannotResolve` (default: `false`)
120
133
121
134
Adds warnings when calc() are not reduced to a single value.
0 commit comments