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

> `A C < B` — if this is the same as `A B:has(> C)`, it makes it really difficult to read at a glance.

Shouldn't that be `B:has(> :is(A C))`

- `B` is the parent of `C`
- `A` is an ancestor of `C`
- `B` is the matched element

But yeah, this inverting will cause confusion.

> it makes it really difficult to read at a glance

I agree, I think there are some benefits to this when writing CSS, but I fear it will be very detrimental to reading/reviewing. However anyone is free to use a linter to disallow such language features :)

-- 
GitHub Notification of comment by romainmenke
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12453#issuecomment-3043736029 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 07:09:00 UTC