#2746·stylus

CSS Container Queries (@content): Stylus adds "&&" where we should get "and"

Author: scripturaCreated Jan 5, 2023Updated Mar 27, 2026

Hello, I noticed a bug with CSS Container Queries (@content): Stylus adds "&&" where we should get "and".

To reproduce:

styl
@container grid-auto (min-width: 25em) and (max-width: 50em)
  .grid-auto
    --n: 2

Current behavior:

@container grid-auto (min-width: 25em) && (max-width: 50em) {
  .grid-auto {
    --n: 2;
  }
}

Expected behavior:

@container grid-auto (min-width: 25em) and (max-width: 50em) {
  .grid-auto {
    --n: 2;
  }
}

The bug reproduced on a pen: @container: bug with stylus lang

  • stylus version : 0.59.0 (and 0.54.8 for the CodePen online)
  • nodejs version : 17.4.0

Thank you for your attention.