Open
Description
When a multiplication operation exists within parentheses in a calc()
expression and it doesn't have spaces around the *
(which it probably won't if the CSS has been minified), postcss-value-parser
parses the *
as though it's part of a word token with any adjacent numbers. Here's the simplest reproduction:
var pvp = require("postcss-value-parser")
pvp('calc((1*1))')
This returns two nested function
nodes which ultimately contain a single word
node with value: "1*1"
. Since 1*1
parses correctly at the root of the calc()
expression, I'm guessing that the parser is forgetting that it's in a calc()
context upon descending into the parentheses... although it seems like even outside that context 1*1
should parse as separate tokens, according to the CSS tokenizer algorithms.
Metadata
Metadata
Assignees
Labels
No labels