문제

I am using SASS and it has a "compressed" output style. It minifies CSS pretty well.

Is the CSS more compressed than other pure CSS alternatives like Clean CSS for example?

CSS minifiers benchmark: http://goalsmashers.github.io/css-minification-benchmark/

도움이 되었습니까?

해결책

The SASS compressed output style only does some relatively basic compression. From the SASS docs:

Compressed style takes up the minimum amount of space possible, having no whitespace except that necessary to separate selectors and a newline at the end of the file. It also includes some other minor compressions, such as choosing the smallest representation for colors. It’s not meant to be human-readable.

It looks like clean-css does some more advanced optimization like combining selectors that share properties, so in theory it should be better than the SASS compressed output style. How much better it is depends on how you write your selectors and how complex your stylesheet is.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top