- From: Lea Verou via GitHub <sysbot+gh@w3.org>
- Date: Wed, 25 Nov 2020 17:14:20 +0000
- To: public-css-archive@w3.org
LeaVerou has just created a new issue for https://github.com/w3c/csswg-drafts: == [selectors][css-nesting] Move nest-containing and nest-prefixed selector definitions to Selectors == Nest-prefixed: https://drafts.csswg.org/css-nesting/#nest-prefixed Nest-containing: https://drafts.csswg.org/css-nesting/#nest-containing These types of relative selectors are useful beyond nesting, as the ampersand can become a universal CSS `this` equivalent. E.g. I can imagine a qSA-like JS API that allows us to do things like `input.find("& + label")` or even compositions like `find("&.foo", "& > .bar", ".baz")`, or even HTML attributes that allow us to refer to elements relative to the current element (how useful that would have been with `label[for]`!) Sure, there is also [`:scope`](https://drafts.csswg.org/selectors-4/#the-scope-pseudo), but there’s a reason we didn't base nesting off that. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5745 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 25 November 2020 17:14:23 UTC