clean-css-cli icon indicating copy to clipboard operation
clean-css-cli copied to clipboard

incorrect handling of the `@container` at-rule

Open phiw13 opened this issue 3 years ago • 1 comments

The (first) selector inside the at-rule together with the opening { of the rule-block and the first property-value pair is removed. (treated as an invalid property name).

input:

@container item (min-width: 400px) {
  .item_inner {
    display: flex;
    flex-direction: row;
    align-items: center;
  }
}

output:

@container item (min-width: 400px){flex-direction:row;align-items:center}

.item_inner { display: flex; is removed, treated as an invalid peoperty name

Testedon macOS 12 with clean-css-cli 5.6.1 and reproduced on the clean-css website.

phiw13 avatar Aug 05 '22 06:08 phiw13

BTW - the new @layer at-rule suffers from the same issue.

Basic example(s) on the MDN page.

phiw13 avatar Aug 05 '22 07:08 phiw13

Both are fixed in clean-css-cli 5.6.2.

jakubpawlowicz avatar Jan 19 '23 10:01 jakubpawlowicz