News for hackers. Stuff that matters.
Re:Help pick a syntax for CSS nesting by coxmichael on Wednesday July 27, 2022 @05:09PM (#32257001)
Can we not just have something like:

  a {
    &:hover {…}

    &:parent(.theme):hover {…}
  }
No crazy selectors with an ampersand in the middle allowed, but a way to apply a parent or ancestor selector, a bit like :where() or :is(). There could be :in() for ancestors.

No one needs this monstrosity:

  dialog {
    @nest html:has(&[open]) {…}
  }
Re:Help pick a syntax for CSS nesting by toastal on Wednesday July 27, 2022 @11:07PM (#32260066)
I'd be happy if they just left it here. You can only nest pseudo-classes and pseudo-selectors, and everything else either use your own tool to generate the CSS or just not not nest.