-
Notifications
You must be signed in to change notification settings - Fork 34
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
calc whitespace not always preserved #22
Comments
improved fix; futtta@5cadbf1 |
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(preg_replace('/\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! :-) |
cfr. 'seems like it fixes "- (" but not ") -"' in tubalmartin/YUI-CSS-compressor-PHP-port#22 (comment)
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
The text was updated successfully, but these errors were encountered: