Skip to content

Could not reduce expression: calc(0.25em - 1px)? #20

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

Closed
davidhund opened this issue Sep 26, 2016 · 2 comments
Closed

Could not reduce expression: calc(0.25em - 1px)? #20

davidhund opened this issue Sep 26, 2016 · 2 comments

Comments

@davidhund
Copy link

Hi, I am using postcss-calc (which uses reduce-css-calc if I'm correct), thanks for your work.

I was under the impression that mixed units should work (I even saw some tests for it) so I am confused why the following throws an error:

Could not reduce expression: calc(.25em - 1px) [postcss-calc]

I am simply using it as:

.c-linklist a {
    display: block;
    padding-top: .25em;
    padding-bottom: calc(.25em - 1px);
}

Am I missing something?

@MoOx
Copy link
Owner

MoOx commented Sep 26, 2016

Mixed unit can only be computed at runtime, in the browser, so no this module can't handle that. There is not tests for that, just to that check to reduced result does not throw.

@MoOx MoOx closed this as completed Sep 26, 2016
@davidhund
Copy link
Author

Right, makes sense really. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants