Skip Menu |

This queue is for tickets about the CSS-Minifier-XS CPAN distribution.

Report information
The Basics
Id: 60238
Status: resolved
Priority: 0/
Queue: CSS-Minifier-XS

People
Owner: Nobody in particular
Requestors: jacobr [...] opera.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.07
Fixed in: 0.09



Subject: Remove units on '0' values
When a value of a CSS property is 0, the unit is unnecessary and should be removed by the minifier. The CSS3 specification states: "The format of a length value (denoted by <length>) is a <number> immediately followed by a unit identifier (e.g., 'px', 'gd'). After the '0' length, the unit identifier is optional." Values to be pruned if preceded by 0 are: %, em, ex, px, gd, rem, vw, vh, vm, ch, mm, cm, in, pt, pc Possibly also, but I am not sure: deg, grad, rad, ms, s, Hz, kHz See http://www.w3.org/TR/CSS2/syndata.html#numbers and http://www.w3.org/ TR/css3-values/#numbers0
Resolved in v0.09, where the units are now dropped if the length is zero.