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

cssmin broke rule for firefox 27.0.1 #14

Closed
elektrovenik opened this issue Mar 5, 2014 · 3 comments
Closed

cssmin broke rule for firefox 27.0.1 #14

elektrovenik opened this issue Mar 5, 2014 · 3 comments

Comments

@elektrovenik
Copy link

This regexp:
$css = preg_replace('/(^|[^0-9])(?:0?.)?0(?:em|ex|ch|rem|vw|vh|vm|vmin|cm|mm|in|px|pt|pc|%|deg|g?rad|m?s|k?hz)/iS', '${1}0', $css);
remove "s" in "0s"

CSSmin transform this css:

page_scroll {

display:block;
font-style:normal;
position:relative;
transition:margin 0.2s ease 0s;
-moz-transition:margin 0.2s ease 0s;
-webkit-transition:margin 0.2s ease 0s;
-o-transition:margin 0.2s ease 0s;
width:36000px;
}
to that:

page_scroll{display:block;font-style:normal;position:relative;transition:margin .2s ease 0;-moz-transition:margin .2s ease 0;-webkit-transition:margin .2s ease 0;-o-transition:margin .2s ease 0;width:36000px}

, but must me that for work in firefox 27.0.1:

page_scroll{display:block;font-style:normal;position:relative;transition:margin .2s ease 0s;-moz-transition:margin .2s ease 0s;-webkit-transition:margin .2s ease 0s;-o-transition:margin .2s ease 0s;width:36000px}

@degtyaryov
Copy link

-$css = preg_replace('/(^|[^0-9])(?:0?.)?0(?:em|ex|ch|rem|vw|vh|vm|vmin|cm|mm|in|px|pt|pc|%|deg|g?rad|m?s|k?hz)/iS', '${1}0', $css);
+$css = preg_replace('/(?<!transition-delay:|transition-duration:|animation-delay:|ease|ease-in|ease-out|linear|step-start|step-end|steps|cubic-bezier|transition:all|transition:margin|transition:top|transition:right|transition:bottom|transition:left|transition:width|transition:height|transition:background|transition:background-image|transition:background-position)(^|[^0-9])(?:0?.)?0(?:em|ex|ch|rem|vw|vh|vm|vmin|cm|mm|in|px|pt|pc|%|deg|g?rad|m?s|k?hz)/iS', '${1}0', $css);

@tubalmartin
Copy link
Owner

I've already fixed this. I'll release a new version this weekend. Thank you for your report!

@tubalmartin
Copy link
Owner

Fixed in v2.4.8-3

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