gruntjs / grunt-contrib-cssmin

Compress CSS files.
http://gruntjs.com/
MIT License
793 stars 147 forks source link

Converting negative z-index to positive on minification #279

Closed binho500 closed 7 years ago

binho500 commented 7 years ago

When minifying .CSS the engine converts negative z-Index to positive. Example: Original CSS:

.backLogo{
    position:absolute;
    bottom: 10px;
    right:15px;
    opacity: 0.4;
    z-index: -1;
}

Minified: .backLogo{position:absolute;bottom:10px;right:15px;opacity:.4;z-index:1}

According to W3C, negative z-Index are allowed:

number Sets the stack order of the element. Negative numbers are allowed

http://www.w3schools.com/cssref/pr_pos_z-index.asp

XhmikosR commented 7 years ago

Such issues should be reported upstream.