diff --git a/cssmin.php b/cssmin.php index 5829937..1388bc1 100644 --- a/cssmin.php +++ b/cssmin.php @@ -598,7 +598,7 @@ private function preserve_old_IE_specific_matrix_definition($matches) private function replace_keyframe_zero($matches) { - return $matches[1] . preg_replace('/0(\{|,[^\{]+\{)/', '0%$1', $matches[2]) . $matches[3]; + return $matches[1] . preg_replace('/0(\{|,[^\)\{]+\{)/', '0%$1', $matches[2]) . $matches[3]; } private function rgb_to_hex($matches) diff --git a/tests/mine/keyframes.css b/tests/mine/keyframes.css index f30a8fa..0a66824 100644 --- a/tests/mine/keyframes.css +++ b/tests/mine/keyframes.css @@ -18,4 +18,5 @@ } @-webkit-keyframes test4{ 0% { transform: rotate3d(0,0,1,30deg); } + 100% { transform: rotate3d(0,0,1,10deg); } } \ No newline at end of file diff --git a/tests/mine/keyframes.css.min b/tests/mine/keyframes.css.min index 1df43bb..b03ffd2 100644 --- a/tests/mine/keyframes.css.min +++ b/tests/mine/keyframes.css.min @@ -1 +1 @@ -@keyframes anim{0%{opacity:0}100%{opacity:1}}@-o-keyframes anim{0%{opacity:0}100%{opacity:1}}@keyframes test{0%,100%{opacity:0}}@keyframes test2{0%,100%{opacity:0}}@keyframes test3{50%{opacity:50}100%,0%{opacity:0}}@-webkit-keyframes test4{0%{transform:rotate3d(0,0,1,30deg)}} \ No newline at end of file +@keyframes anim{0%{opacity:0}100%{opacity:1}}@-o-keyframes anim{0%{opacity:0}100%{opacity:1}}@keyframes test{0%,100%{opacity:0}}@keyframes test2{0%,100%{opacity:0}}@keyframes test3{50%{opacity:50}100%,0%{opacity:0}}@-webkit-keyframes test4{0%{transform:rotate3d(0,0,1,30deg)}100%{transform:rotate3d(0,0,1,10deg)}} \ No newline at end of file