- From: Lea Verou via GitHub <noreply@w3.org>
- Date: Sun, 06 Jul 2025 15:48:22 +0000
- To: public-css-archive@w3.org
LeaVerou has just created a new issue for https://github.com/w3c/csswg-drafts: == [selectors-5][css-syntax] Resolve to use `'/' [<idref> | <function>] '/'` syntax for all future combinators == This was brought to my attention by [this comment](https://github.com/w3c/csswg-drafts/issues/10970#issuecomment-3033926019). The selectors-5 spec currently [defines](https://drafts.csswg.org/selectors-5/#idref-combinators) a general idref combinator as just `/<attribute-name>/` (e.g. `/for/`). It looks like it was [originally drafted](https://github.com/w3c/csswg-drafts/blame/4ee0078cae1ab099210a48c685b35fb1d00d5151/selectors-4/deferred-for-level-5#L1) by @tabatkins 11 years ago (when we were indeed thinking of having a `/for/`) and then [ported](https://github.com/w3c/csswg-drafts/blame/main/selectors-5/Overview.bs#L204) to selectors-5 by @dbaron about a year ago. I was under the impression we decided to use the slash syntax for _any_ new combinator, in which case [idrefs](https://github.com/w3c/csswg-drafts/issues/10970) (or [general attribute refs](https://github.com/w3c/csswg-drafts/issues/12446)) would need additional namespacing, otherwise we can't use this syntax for any other combinator (e.g. [`/slotted/`](https://github.com/w3c/csswg-drafts/issues/7922)) because anything can potentially conflict with an attribute name. I think we should get a resolution on this and change the selectors-5 section accordingly (and/or add a "Not ready for implementation" banner to it), as new combinators get periodically proposed for various things and if this gets implemented, we'll be back on square one, having to find a new generic syntax that is backwards compatible or going back to inventing more ASCII art combinators (which makes it very hard to add new combinators and is terrible DX for authors). Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12451 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 6 July 2025 15:48:23 UTC