W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2021

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

From: Lea Verou via GitHub <sysbot+gh@w3.org>
Date: Mon, 31 May 2021 17:47:44 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-851615137-1622483262-sysbot+gh@w3.org>
> @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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:34 UTC