5 ms·
CSSNano: A modular minifier based on the PostCSS ecosystem
- deleted 11y ago[deleted]
- davidkpiano 11y agoThis is the kind of thing that PostCSS should really be used for: responsible transforming of existing CSS without inventing new syntax or doing invisible "magical" transformations. Or trying to emulate built-in features from other preprocessors.
- snarkyturtle 11y agoSo really you just don't like cssnext/css-modules, since there are lots of postcss plugins that try to emulate features from preprocessors. If all you're doing is transforming css, I don't see the need to abandon preprocessors though...
- davidkpiano 11y agoExactly. Use PostCSS in conjunction with preprocessors.
- audessuscest 11y agoSimilar : https://github.com/hail2u/node-csswring https://github.com/hail2u/node-csswring Written with PostCSS too
- ZeroGravitas 11y agoSome of these seem a bit extreme, converting things to pica from px, for example? I could see that confusing me if I was trying to work from the deployed CSS back.
- beneb 11y agoSince v3.2.0 this is no longer done by default and can be enabled via the config object. The website should probably be updated to reflect this. https://github.com/ben-eb/cssnano/releases/tag/v3.2.0 https://github.com/ben-eb/cssnano/releases/tag/v3.2.0
- ganarajpr 11y agoI am interested to know what are the objective benefits of minication ? My understanding was that if you did enable gzip compression that takes away most of your advantages from minifying the code ? Am I wrong in this ? Also, does someone have stats on how much more saving can be done with minification , compared to just gzip ?
- beneb 11y agoI don't have a gzip benchmark for cssnano itself, but I know that the road to best compression is using both. http://stackoverflow.com/a/807161/1745309 http://stackoverflow.com/a/807161/1745309