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))')
(Live on RunKit)
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.
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-parserparses the*as though it's part of a word token with any adjacent numbers. Here's the simplest reproduction:(Live on RunKit)
This returns two nested
functionnodes which ultimately contain a singlewordnode withvalue: "1*1". Since1*1parses correctly at the root of thecalc()expression, I'm guessing that the parser is forgetting that it's in acalc()context upon descending into the parentheses... although it seems like even outside that context1*1should parse as separate tokens, according to the CSS tokenizer algorithms.