Skip to content
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

3-level deep var()s inside a calc() throw an error #119

Closed
maranomynet opened this issue Sep 22, 2020 · 3 comments
Closed

3-level deep var()s inside a calc() throw an error #119

maranomynet opened this issue Sep 22, 2020 · 3 comments
Labels
bad-parser postcss-calc fails to parse the input bug

Comments

@maranomynet
Copy link

maranomynet commented Sep 22, 2020

This valid CSS code:

body {
  width: calc( var(--a, var(--b, var(--c))) + 10px );
}

Triggers this error in postcss-calc@7.0.4:

Stack:
JisonParserError: Parse error on line 1: 
var(--a, var(--b, var(--c))) + 10px
---------------------------^
Expecting end of input, "ADD", "SUB", "MUL", "DIV", got unexpected "RPAREN"

Whereas this gets parsed correctly:

body {
  width: calc( var(--a, var(--b)) + 10px );
}
@alexander-akait
Copy link
Collaborator

PR welcome

@ludofischer ludofischer added bad-parser postcss-calc fails to parse the input bug labels Jan 9, 2022
@ludofischer
Copy link
Collaborator

Still throws a warning even though it does not crash in 8.2

@maranomynet
Copy link
Author

This is reported and being discussed in #104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bad-parser postcss-calc fails to parse the input bug
Projects
None yet
Development

No branches or pull requests

3 participants