ruby-yui-compressor icon indicating copy to clipboard operation
ruby-yui-compressor copied to clipboard

Removing units from transitions that use zero

Open avilyn opened this issue 9 years ago • 0 comments

The YUI::CssCompressor is currently removing the units from transitions that use 0.

Example CSS file:

.stuff {
  transition: opacity 0ms ease-out 200ms;
}

Which gets compressed to (using 0.12.0):

".stuff{transition:opacity 0 ease-out 200ms}"

But it should be compressing to the following instead:

".stuff{transition:opacity 0ms ease-out 200ms}"

The ms after the 0 is required for several browsers. Without it they don't recognize the rule as a valid transition. Tested in Firefox 39 and Chrome 44.

avilyn avatar Aug 11 '15 21:08 avilyn