- From: CSS Meeting Bot via GitHub <noreply@w3.org>
- Date: Wed, 02 Jul 2025 15:14:43 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-nesting-1][css-cascade-6] Should/can relative selectors be allowed un-nested`, and agreed to the following:
* `RESOLVED: Close no change.`
<details><summary>The full IRC log of that discussion</summary>
<fantasai> fantasai: Might've been useful to have Tab at this breakout<br>
<fantasai> miriam: This was raised by Lea wrt if a whole file is scoped on import<br>
<fantasai> miriam: If those items are relative selectors ...<br>
<fantasai> miriam: Should we allow relative selectors at every level of CSS including the root?<br>
<fantasai> miriam: If so, what would it mean?<br>
<fantasai> miriam: My leaning is that we don't need to do this<br>
<fantasai> miriam: Tab had some concerns with it<br>
<fantasai> miriam: For example, a relative selector with a child combinator is meaningless in relation to the root<br>
<fantasai> miriam: similarly ??<br>
<fantasai> miriam: And normal descendant selector doesn't need to be relative until imported into a scope<br>
<fantasai> miriam: So not really combinators that are meaningful to do at the root level<br>
<andruud> q+<br>
<astearns> ack andruud<br>
<andruud> Just move on for a bit then<br>
<astearns> ack fantasai<br>
<emilio> scribe+<br>
<emilio> fantasai: the child combinator [drop]<br>
<matthieud> q+<br>
<emilio> matthieud: what's the point of having relative top level selectors?<br>
<emilio> ... if we allow these is it only working when we `@import` scope() something?<br>
<emilio> miriam: leaverou was expecting it to be relative to `:root` by default, but as tab pointed out that's not particularly useful<br>
<emilio> ... so that's why I suggest no-change<br>
<emilio> ... once we import in scopes I think people may want to do it but I don't think it makes sense to make it valid or not depending on the way it's important<br>
<kizu> +1 to no change<br>
<emilio> matthieud: agree that they can just wrap in `:scope`<br>
<emilio> miriam: or prefix each selector yeah<br>
<emilio> fantasai: I think it's fine<br>
<emilio> emilio: +1 fwiw<br>
<emilio> astearns: if we're wrong and this is something people are going to use often<br>
<emilio> ... and litter their sheets with `:scope`, how frustrating is that going to be?<br>
<emilio> q+<br>
<emilio> ack matthieud<br>
<astearns> ack matthieud<br>
<emilio> miriam: not sure who's going to complain about it<br>
<emilio> ... but I think it's more explicit when you litter it with `:scope`<br>
<emilio> ... so I think it's still the right choice<br>
<emilio> ... it also raises the question of also allowing bare declarations in `@scope`, do we want to allow bare declarations in a css file?<br>
<kizu> +1, explicit > implicit<br>
<fantasai> emilio: You don't have to use :scope everywhere, right, can just wrap whole style sheet in @scope<br>
<fantasai> emilio: so even if you wanted to do this, only need to add 2 lines of CSS ... and technically don't even need the closing bracket<br>
<astearns> ack emilio<br>
<emilio> s/@scope/:scope {`<br>
<emilio> s/@scope/:scope {/<br>
<fantasai> miriam: only needed for sibling or child combinator. Most styles are descedant combinators anyway<br>
<fantasai> miriam: and sibling is out of scope<br>
<fantasai> andruud: I'm happy with the discussion so far<br>
<romain> +1 to no change<br>
<emilio> +1<br>
<fantasai> astearns: Proposed resolution, closed no change. Objections?<br>
<fantasai> RESOLVED: Close no change.<br>
</details>
--
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12418#issuecomment-3028257454 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 2 July 2025 15:14:44 UTC