css / csso

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

Can't optimize these straightforward @supports rules #442

Open stormbeforesunsetbee opened 2 years ago

stormbeforesunsetbee commented 2 years ago

Example snippet:

@supports (gap:0) or (display:-ms-flexbox) {
  #daftar .hasil .bawah > div {
    max-width:none
  }
}

_:-ms-fullscreen, :root #daftar .hasil .bawah > div {
  max-width:none
}

@supports (gap:0) or (display:-ms-flexbox) {
  #daftar .hasil .bawah > div {
    max-width:none
  }
}

Current result:

@supports (gap:0) or (display:-ms-flexbox){#daftar .hasil .bawah>div{max-width:none}}:root #daftar .hasil .bawah>div,_:-ms-fullscreen{max-width:none}@supports (gap:0) or (display:-ms-flexbox){#daftar .hasil .bawah>div{max-width:none}}

Expected result:

@supports (gap:0) or (display:-ms-flexbox){#daftar .hasil .bawah>div{max-width:none}}:root #daftar .hasil .bawah>div,_:-ms-fullscreen{max-width:none}