Skip to content
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

background{0 0} becomes background{0}? #24

Closed
futtta opened this issue Jul 28, 2015 · 3 comments
Closed

background{0 0} becomes background{0}? #24

futtta opened this issue Jul 28, 2015 · 3 comments

Comments

@futtta
Copy link

futtta commented Jul 28, 2015

a{background:0 0}
becomes
a{background:0}

fix could be to change line 357 from
$css = preg_replace('/(background\-position|webkit-mask-position|(?:webkit|moz|o|ms|)\-?transform\-origin)\:0(;|\}| \!)/iS', '$1:0 0$2', $css);
into
$css = preg_replace('/(background|background\-position|webkit-mask-position|(?:webkit|moz|o|ms|)\-?transform\-origin)\:0(;|\}| \!)/iS', '$1:0 0$2', $css);

frank

@mikeytown2
Copy link

Shouldn't more regex control characters be escaped; not less?

Before:
$css = preg_replace('/(background\-position|webkit-mask-position|(?:webkit|moz|o|ms|)\-?transform\-origin)\:0(;|\}| \!)/iS', '$1:0 0$2', $css);

After:
$css = preg_replace('/(background|background\-position|webkit\-mask\-position|(?:webkit|moz|o|ms|)\-?transform\-origin)\:0(;|\}| \!)/iS', '$1:0 0$2', $css);

@futtta
Copy link
Author

futtta commented Aug 21, 2015

Had some issues with markdown, so some backslashes escaped ;-)

anyway, it now is how I meant it to be. questions remains whether webkit-mask-position needs escaping, but I'll leave that to @tubalmartin, he should know ;-)

futtta added a commit to futtta/YUI-CSS-compressor-PHP-port that referenced this issue Nov 28, 2015
@tubalmartin
Copy link
Owner

Fixed in v2.4.8-p7 release. Thank you guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants