NUglify icon indicating copy to clipboard operation
NUglify copied to clipboard

Missing CSS optimization - using '0' instead of 'none'

Open SpeednetGroup opened this issue 3 years ago • 2 comments

Please update the CSS optimizations in NUglify to user border:0 instead of border:none. They are functionally equivalent.

This optimization should apply to the following rules:

  • border
  • border-top
  • border-right
  • border-bottom
  • border-left
  • outline

SpeednetGroup avatar Apr 16 '22 01:04 SpeednetGroup

is border: 0 the same as border: 0px

trullock avatar Apr 16 '22 18:04 trullock

is border: 0 the same as border: 0px

It is the same as zero of any units. It could be 0px, 0em, 0%, etc. 0 is equivalent to all of them, which is why you never need units on a zero value.

Edit: The only exception I have found to this is in the comment I posted regarding a percent sign: https://github.com/trullock/NUglify/issues/316#issuecomment-1100779301_

SpeednetGroup avatar Apr 17 '22 00:04 SpeednetGroup