NUglify icon indicating copy to clipboard operation
NUglify copied to clipboard

Missing CSS optimization - !important

Open SpeednetGroup opened this issue 3 years ago • 3 comments

Please update the CSS optimizations in NUglify to remove the space before !important.

Instead of color:red !important the optimized CSS should be color:red!important.

SpeednetGroup avatar Apr 16 '22 01:04 SpeednetGroup

so the AjaxMinifier codebase from which this code comes contain this:

// issue #21057 - do not trip space before !important keyword.

Can we try and find this to find out what the reason was, maybe we're overlooking something

trullock avatar Apr 16 '22 18:04 trullock

There is nothing in the CSS syntax that requires a space. Perhaps a very old browser, maybe even something like IE4, had a bug that required a space, but I don't believe anything in use today would do that.

Here is a Stack Overflow answer that references the CSS spec: https://stackoverflow.com/a/31143078/776587

SpeednetGroup avatar Apr 17 '22 01:04 SpeednetGroup

You're probably right, AjaxMin goes back years and supported ancient browsers

trullock avatar Apr 17 '22 07:04 trullock