[csswg-drafts] [css-selectors] Allow relative selectors everywhere (#8010)

romainmenke has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-selectors] Allow relative selectors everywhere ==
A significant motivation behind changing the nesting syntax was making selectors easier to copy/paste between contexts.

- https://github.com/w3c/csswg-drafts/issues/7834
- https://github.com/w3c/csswg-drafts/issues/5745

This changed `.foo { & .bar{} }` into `.foo { .bar{} }`
Both `.foo` and `.bar` can be copy/pasted to any other context.

`.foo { > .bar{} }` however can not be copied to the root of the stylesheet.

```css
/* invalid */
> .bar{}
```

Can `> .bar{}` be equal to `:root > .bar{}` in all contexts that do not specify a scoping root?

Currently I think it is only allowed in :
- `@scope`
- nested context
- `:has()`

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8010 using your GitHub account


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

Received on Thursday, 3 November 2022 22:41:34 UTC