css / csso

CSS minifier with structural optimizations
https://css.github.io/csso/csso.html
MIT License
3.74k stars 189 forks source link

[bug] minifies removes @media tags #464

Open cocoliliace opened 1 year ago

cocoliliace commented 1 year ago

Version 5.0.5. Code to reproduce

const { minify } from require("csso");
const style = `
body {
  color: red;
}
@media (width < 720px) {
  body {
    color: blue;
  }
}`;
console.log(minify(style));
// prints { css: 'body{color:red}', map: null }

Screenshot: image

monochromer commented 1 year ago

Does CSSO support range syntax?

wolfcreative commented 12 months ago

Confirm. There is a problem, I have just encountered it.

ppfeufer commented 10 months ago

Yep, just ran into this one as well. Would be nice if range syntax would be supported.

stepanjakl commented 1 month ago

+1