Re: [csswg-drafts] [css-nesting-1] Yet another nesting proposal (Option 5) (#7970)

> > Yes, because to use a symbol, the feature needs to be needed frequently enough that brevity is important. This is not true for every feature, but it certainly is for nesting.
> 
> And in this proposal, even the `&` is not going to be needed that often (zero characters wins for brevity every time). The enclosing `@nest` will likely not get repeated enough to justify its removal/replacement.

In option 3, which is the current state of the spec, `&` will still be needed pretty often. It's common to style descendant element selectors.

> > Other places …in a selector?
> 
> Yes, in principle it could be used in a selector in some context that isn't nesting. We have a limited number of ascii-friendly sigils to use and may need to repurpose it at some point. If the need is to detect the feature of nesting (or the other theoretical usage), it may not be enough to disambiguate. Being able to detect an actual at-rule is more specific, and more obvious.

I still don't understand what problem you are seeing. You think browsers will implement `&` in selectors, *without* implementing Nesting, and we need a way to distinguish the two?

> You also still never explained your initial objection about having to create a "whole separate rule" and the perceived componentization issue.

Copying two rules (two sets of `{...}`) is more error-prone than copying one and feels more scattered.

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


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

Received on Thursday, 1 December 2022 19:39:24 UTC