CSS minimizer removes units for null values ​​(px, ms, em)

In the combres file, I use defaultCssMinifierRef = "msajax" .

This minifier removes units (px, em, ms) for all null values. But 0ms is not the same as 0s. So what should I do if I need to save units after clarification?

+4
source share
2 answers

The device identifier can only be omitted for lengths from zero. Other units require a device identifier even for zero values. Lengths include em, pxetc. There is some debate about whether it is better to include it or not (see this question and this one ). A minifier will and must remove the device identifier along the length of zero. See the specification here :

for zero length, the device identifier is optional

For lack of length, unit identifiers are required, null or not. If the minifier deletes the device identifier without length, for example, msin the time specified as the property value transition-duration, this is an error in the minifier.

+5
source

0 .

CSS 0 , 0 . top: 20px, 20px , .

top: 0, top: 0px , .

, 0px, 0em, 0.

, , top: 20px, , , top: 20rem top: 20px, .

0 , , , , , ( , 0 ).

@torazaburo. CSS, . 100ms, 0.1s , @torazaburo , minifier, - 100ms 0.1s .

+2

All Articles