if you have the following CSS code calc(612px + (100% - 1024px)/2) the css min function generates at the moment the following result: calc(612px +(100% - 1024px)/2). Because the whitespace are left over between the plus and the bracket, the css code is invalid.
The problem is located in the replace_calc function. I have fixed it with the following code:
$token = preg_replace('/\s*([\*\/\(\),])\s*/', '$1', $matches[2]); $token = preg_replace(['/(\S)([+-])/', '/([+-])(\S)/'], '$1 $2', $token); $this->preserved_tokens[] = trim($token);
Please fix this problem in the next Version :)
Best regards
if you have the following CSS code
calc(612px + (100% - 1024px)/2)
the css min function generates at the moment the following result:calc(612px +(100% - 1024px)/2)
. Because the whitespace are left over between the plus and the bracket, the css code is invalid. The problem is located in the replace_calc function. I have fixed it with the following code:$token = preg_replace('/\s*([\*\/\(\),])\s*/', '$1', $matches[2]); $token = preg_replace(['/(\S)([+-])/', '/([+-])(\S)/'], '$1 $2', $token); $this->preserved_tokens[] = trim($token);
Please fix this problem in the next Version :) Best regards