Re: [csswg-drafts] [css-nesting-1] Syntax Invites Errors (#7834)

> Nope, under this proposal [<relative-selector>](https://drafts.csswg.org/selectors/#typedef-relative-selector), i.e. + .foo, > .foo or ~ .foo will be perfectly valid.

I overlooked that, thank you for pointing that out.

I wonder if we can have relative selector support in nesting without breaking the current proposal and if this would be implementable in browsers?

> Both .foo& and .foo & are far rarer than & .foo and &.foo which are some of the most common nested selectors.
Also, I'm having trouble following this logic. If something is confusing it justifies something else being confusing?

If it isn't a truly good solution that covers the entire problem I sometimes (not always) find it better to do nothing. This gives a result that worse but is consistently worse instead of confusing in its own way.

If `&<space>` or `<space>&` is a problem that must be solved then I it must be better than having the ability to omit the leading `&`.


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


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

Received on Thursday, 6 October 2022 18:40:19 UTC