Closed SpeednetGroup closed 2 years ago
Ok these are great thanks
Can you break them down into separate issues?
Thanks
I'd be happy to -- but just want to be sure that you want a separate issue for each bullet point above. i.e., create a separate issue for "space before !important", etc.
Yes please
OK, no problem, will do this a bit later.
Closed because each point was separated into its own issue.
I recently switched from using a home-grown CSS compressor to NUglify and noticed that the minified file size was larger using NUglify.
I then compared the output produced by each and came up with a number of missing CSS optimizations in NUglify.
!important
can be removed.#808080
should begray
and#f00
should bered
. Same for RGB and other color formats. All colors (except when they include an opacity component) should be reduced to the smaller of either the word or the 6- or 3-digit color code.0%
should be0
.border:none
should beborder:0
.@supports (
(and other similar queries) should have no space - i.e.,@supports(
.font-weight:bold
should befont-weight:700
.margin:15px 0 0 0
should bemargin:15px 0 0
.There might be some others, but this is what I came up with in a first pass.