P
P
ProgerSoft2018-12-15 08:07:57
css
ProgerSoft, 2018-12-15 08:07:57

Gulp - CSSO vs CLEAN-CSS?

What is better to use in gulp to minify CSS styles, CSSO or CLEAN-CSS What are their pros and cons and which is better?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vadim Kot, 2018-12-15
@vadimkot

I myself once chose between csso and cssnano - after testing each in several projects, the minified style files after csso were smaller in size. Of course, you need to take into account that you can run with different options, but I always make a choice based on my own testing. Therefore, the choice is yours.

R
Rustam Bainazarov, 2018-12-15
@SmthTo

Neither one nor the other.
The best is CSSNano. In addition to the usual CSS minification, it uses other code reduction techniques (for example, converting RGB and RGBA colors to HEX colors, removing unnecessary property values, shortening animation names, combining several classes separated by commas in case of the same styles, well, a bunch everything else).
https://cssnano.co
https://www.npmjs.com/package/gulp-cssnano
PS Works correctly with AutoPrefixer (because it's also based on PostCSS). It also supports source maps.
UPDATE.We are talking about the work of the original CSSNano (not gulp-cssnano) in conjunction with PostCSS for Gulp. See other people's comments on my answer, there are some interesting things/aspects about other similar plugins that might well be better than CSSNano.

W
weranda, 2020-08-03
@weranda

I'll just leave this here. Test results:
5f27ed0d38ab5536894089.png
Red color - not very good.
Blue is normal.
Another color is in the middle range of the number.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question