yui / yuicompressor

YUI Compressor
http://yui.github.com/yuicompressor/
Other
3.01k stars 662 forks source link

CSS: Invalid whitespace removal / @supports () "or" () #340

Open claudio147 opened 3 years ago

claudio147 commented 3 years ago

If I combine certain properties in the @support query the whitespace after the "or" gets removed and this occurs invalid CSS (at least in Chrome)

Original:

.foo {
    @supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
        background: rgba(69, 69, 69, 0.5);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
      }
}

Compressed to:

.foo {
    @supports (backdrop-filter: blur(10px)) or(-webkit-backdrop-filter: blur(10px)) {
        background: rgba(69, 69, 69, 0.5);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
      }
}
melloware commented 2 years ago

I have fixed this in my fork of this plugin: https://github.com/primefaces-extensions/resources-optimizer-maven-plugin/commit/c630c3af401d4c0ed8b227aec8bcde221e6cec1a