For example, a selector like

. t { margin: 0 0.5em 1em-0.2em; }

is compressed to

.t{margin:0 .5em 1em -0.2em}

Perhaps this is an old bug in the YUI Compressor.

1

There are 1 answers

10
Paul Sweatte On

The zero is needed to identify the value as a number. The CSS tokenizer requires this:

num [0-9]+|[0-9]*"."[0-9]+

Otherwise it would interpret the identifier as a dimension:

ident -?{nmstart}{nmchar}*

Due to the fact that the 1em dimension can have the minus sign - as part of its identifier:

CSS Syntax ident Railroad Diagram CSS Syntax number and dimension Railroad Diagram

It can be interpreted as:

1em- 0.2em

or

1em -0.2em

References