Re: [csswg-drafts] [css-cascade-6] Is it possible to account for proximity of sibling elements? (#7233)

The CSS Working Group just discussed `Proximity of siblings`, and agreed to the following:

* `RESOLVED: ~~ is a sibling combinator that prefers closer siblings`

<details><summary>The full IRC log of that discussion</summary>
&lt;emilio> topic: Proximity of siblings<br>
&lt;emilio> github: https://github.com/w3c/csswg-drafts/issues/7233<br>
&lt;emilio> miriam: original request framed it as sibling scopes<br>
&lt;emilio> ... but when we dug they cared about proximity of siblings in the cascade<br>
&lt;emilio> ... we have this for descendants where proximity affects the weight in the cascade<br>
&lt;emilio> ... this wanted to account for siblings<br>
&lt;emilio> ... seems we could do something like that with different syntax<br>
&lt;emilio> TabAtkins: I don't think how we'd account for this in `@scope`<br>
&lt;zcorpan> h1 ~~ p or h1 ++ p<br>
&lt;emilio> s/think/know<br>
&lt;emilio> TabAtkins: but the use case is great and the combinator syntax is great<br>
&lt;emilio> ... doesn't matter which syntax<br>
&lt;emilio> zcorpan: proposal are ~~ or ++<br>
&lt;emilio> q+<br>
&lt;ydaniv> +1 for snakes<br>
&lt;tantek> +1 for snakes<br>
&lt;emilio> TabAtkins: I don't care about which one but we should make it work in @scope<br>
&lt;heycam> emilio: I argue for snakes<br>
&lt;tantek> since ++ already means something in other languages :)<br>
&lt;Rossen_> ack emilio<br>
&lt;fantasai> +1 tantek<br>
&lt;heycam> emilio: snake already involves all the siblings<br>
&lt;heycam> ... while plus doesn't<br>
&lt;fantasai> s/+1 tantek/tantek++/<br>
&lt;heycam> ... so it feels more logical<br>
&lt;zcorpan> mushroom ~~ muchroom<br>
&lt;emilio> TabAtkins: Currently child one is based on child rather than descendant combo, so would be more consistent with +<br>
&lt;emilio> fantasai: I agree with tab that ++ is more analogous but I also prefer the snakes<br>
&lt;zcorpan> 🐍<br>
&lt;fantasai> Rossen_: Imagine you're on a plane...<br>
&lt;TabAtkins> Hm, thinking using `to sibling` keyword in @scope would work<br>
&lt;emilio> miriam: proposal is adding ~~ as a sibling combinator that prefers closer siblings<br>
&lt;heycam> emilio: after Tab's argument I prefer the pluses, but I don't mind either way<br>
&lt;emilio> RESOLVED: ~~ is a sibling combinator that prefers closer siblings<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7233#issuecomment-1248655289 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 15 September 2022 21:33:30 UTC