Closed futtta closed 7 years ago
seems like it fixes "- (" but not ") -"
can you try with this commit @rostik ?
@futtta that didnt work, but i did this, not sure if its correct, but it worked
$this->preserved_tokens[] = preg_replace('/([+-]{1})(/','/$1 (/',trim(pregreplace('/\s([_\/(),])/', '$1', $matches[2])));
yeah, had a stupid mistake in my code (forgot re-replacing $calc by $matches[2]) cfr. this commit.
can you try again?
this works. thanks! @futtta
great, thanks for testing & confirming! :-)
Can this fix be implemented into the mainline please?
Thank you for the fix. I'll release it this week ;)
great to see you're back @tubalmartin :-)
Fixed in v2.4.8-p7 release. Thank you guys!
An Autoptimize-user has CSS with a calc in it which gets broken. Whereas YUI-CSS-compressor-PHP-port normally preserves spaces, it does not in this case (confirmed using GUI)
Test input;
input { width: calc(100% - (1em*1.5)); }
Expected output:
input{width:calc(100% - (1em*1.5))}
Actual Output:
input{width:calc(100% -(1em*1.5))}
Frank