gruntjs / grunt-contrib-cssmin

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

Expose zeroUnits clean-css option #247

Closed kkirsche closed 8 years ago

kkirsche commented 8 years ago

'[+-]properties.zeroUnits' - turn on / off units removal after a 0 value

https://github.com/jakubpawlowicz/clean-css

X-Ref: twbs/bootstrap#18152 & twbs/bootstrap#18151

cvrebert commented 8 years ago

I'm reasonably sure you just have to specify compatibility: { properties: { zeroUnits: false } } in the options object, which then basically just gets passed on to clean-css.

See e.g. https://github.com/jakubpawlowicz/clean-css/blob/314ef40bde8777a719869b4d8c33b40ee34ad4f9/test/selectors/simple-test.js#L701

corvae commented 8 years ago

I'm still having an issue with this, using compatibility: { properties: { zeroUnits: false } }. compatibility: "*" works, but it still removes units for zero values. I'm just not sure how to add that property.

cssminerror

If I force it:

cssminerror2