Re: [csswg-drafts] [css-nesting] :selector-replace() pseudo-class function (#6330)

> @LeaVerou I’m not totally opposed to reference different levels with something like `&1` or `&2`, but I submit that this results in a tighter coupling – whenever you change the nesting these references might break silently.

Oh that's a good point, we don't want that.

I wonder then if it should be explicit: You'd declare a name for the `&` in the ancestor scope that would allow you to reference it in descendants and how.

E.g. something like:

```css
.foo {
 scope-name: bar;

 & .bar {
  &bar:focus .baz {

  }
 }
}
```



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


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

Received on Monday, 31 May 2021 17:47:57 UTC