File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed
Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1319,6 +1319,7 @@ mod tests {
13191319 minify_test ( ".foo { transition: width 2s 1s }" , ".foo{transition:width 2s 1s}" ) ;
13201320 minify_test ( ".foo { transition: width 2s ease 1s }" , ".foo{transition:width 2s 1s}" ) ;
13211321 minify_test ( ".foo { transition: ease-in 1s width 4s }" , ".foo{transition:width 1s ease-in 4s}" ) ;
1322+ minify_test ( ".foo { transition: opacity 0s .6s }" , ".foo{transition:opacity 0s .6s}" ) ;
13221323 test ( r#"
13231324 .foo {
13241325 transition-property: opacity;
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ impl Parse for Transition {
6666impl ToCss for Transition {
6767 fn to_css < W > ( & self , dest : & mut Printer < W > ) -> std:: fmt:: Result where W : std:: fmt:: Write {
6868 self . property . to_css ( dest) ?;
69- if self . duration != 0.0 {
69+ if self . duration != 0.0 || self . delay != 0.0 {
7070 dest. write_char ( ' ' ) ?;
7171 self . duration . to_css ( dest) ?;
7272 }
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ impl ToCss for Time {
4343 // anything smaller is longer
4444 match self {
4545 Time :: Seconds ( s) => {
46- if * s < 0.1 {
46+ if * s > 0.0 && * s < 0.1 {
4747 ( * s * 1000.0 ) . to_css ( dest) ?;
4848 dest. write_str ( "ms" )
4949 } else {
@@ -52,7 +52,7 @@ impl ToCss for Time {
5252 }
5353 }
5454 Time :: Milliseconds ( ms) => {
55- if * ms >= 100.0 {
55+ if * ms == 0.0 || * ms >= 100.0 {
5656 ( * ms / 1000.0 ) . to_css ( dest) ?;
5757 dest. write_str ( "s" )
5858 } else {
You can’t perform that action at this time.
0 commit comments