NUglify
NUglify copied to clipboard
Missing CSS optimization - 0% (and other units)
Please update the CSS optimizations in NUglify to remove the percent sign from zero (0) percentages.
Instead of 0%
for a value, it should be 0
.
This would apply to other units of measure as well. For exmaple, px
, em
, pt
, in
, cm
, mm
, pc
, ex
, %
, ms
, s
, deg
, rad
, grad
.
I'm a bit out of practice with CSS but I'm pretty sure that %
was necessary under some circumstances, but maybe I'm just thinking back to some awful IE6 days?
I'm a bit out of practice with CSS but I'm pretty sure that
%
was necessary under some circumstances, but maybe I'm just thinking back to some awful IE6 days?
You're right, there is a case and I just tested it. You cannot specify an RGB or HSL color using percentages together with a zero that's missing the percentage sign. But this does not apply in most other cases. For example, you can specify margin:10% 0
.