-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow rounding option #61
base: master
Are you sure you want to change the base?
Conversation
There is no difference here from the current implementation. You can already disable rounding by setting |
@andyjansson, there is a difference when the This option allows users to limit the default precision to what's defined in Let's assume you have configured
What's the advantage? We never have rounded numbers which can cause issues like twbs/bootstrap#27374 and we don't have expressions like This option is a bit tricky because it depends on another option, that's why I tried to explain it with examples instead of words. |
Please open an issue about it so it can be discussed further. |
83becf4
to
2773092
Compare
@@ -116,6 +116,19 @@ var out = postcss() | |||
.css | |||
``` | |||
|
|||
#### `allowRounding` (default: `true`) | |||
|
|||
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)`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set to
x2 :)
/cc @MartijnCuppens can we rebase again? 😄 |
By default this option is
true
and this will result in the same behaviour as we have now. If it's set tofalse
, we prevent for examplecalc(100% / 3)
to be rounded to33.33333%
.Closes #62