sqwish
sqwish copied to clipboard
a node-based CSS compressor
sqwish incorrectly combines pseudo-classes with the previous selector when it is unqualified. styles.css ``` css .class :first-child { color: red; } ``` styles.min.css ``` css .class:first-child{color:red} ``` Qualifying it with...
Media queries with max-width are parsed incorrectly, leading to errors in page display. May affect more than just those with max-width. For example `.class3 { margin: 0; } @media (max-width:...
Code with empty multiline comments (`/**/`) gets parsed incorrectly, and could lead to chunks of CSS getting erased through minification, like this: ``` /**/ .any-code-here-is-erased { display: none; } /**/...
http://goalsmashers.github.io/css-minification-benchmark/ - here you can see that despite not best compression rate of sqwish it is EXTREMELY faster than any other compressor. I think it would be cool to mention...
The previous solution could only solve lines containing 1 color string, not multiple. It should handle any number of color strings this time around.
-Feature: Comments check for copyright -Bugfix: Media query in strict mode -Other: Overall minor speed improvement, linting, etc.
.class { *display:block; } caused error: SyntaxError: Invalid regular expression: /^*display:/: Nothing to repeat now it compiles fine.
Looks like --strict doesn't support multiple font faces. ``` css @font-face { font-family: 'Exo'; src: url(exo.ttf); } @font-face { font-family: 'Exo'; src: url(exo.ttf); } @font-face { font-family: 'Oswald'; src: url(oswald.ttf);...
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e6e6e6',endColorstr='#ffffff',GradientType=0 ) This line is broken if "ffffff" is replaced by "fff" (and fff is for some strange reason interpreted as #000000, so instead of white you have black) Affected...