Re: [csswg-drafts] [selectors] Backwards combinators (#12453)

@Loirooriol, your explanation makes sense for `A B C D`, but it's still not clear to me that `<` is unambiguous. Can you explain the "group pairwise" step? I'm reading it as an "order of operations" where space has higher precedence than `<`, but I don't know why that would be the case.

For `A B C D` here are the progressions I came up with. Note that they both lead to the same final form.

Processing combinators left to right:
```
A B C D
:is(A B) C D
:is(:is(A B) C) D
```

Processing combinators right to left:
```
A B C D
:is(A B C) D
:is(:is(A B) C) D
```

Now, applying the same progressions to `A B < C D`:

Processing combinators left to right:
```
A B < C D
:is(A B) < C D
C:has(> :is(A B)) D
```

Processing combinators right to left:
```
A B < C D
:is(A B < C) D
:is(A C:has(> B)) D
```


-- 
GitHub Notification of comment by kbabbitt
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12453#issuecomment-3046726272 using your GitHub account


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

Received on Monday, 7 July 2025 22:52:29 UTC