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

Re: [csswg-drafts] [css-values-4] inherit() function: like var() for parent value, for any property (#2864)

From: Lea Verou via GitHub <sysbot+gh@w3.org>
Date: Mon, 17 May 2021 15:03:32 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-842398907-1621263810-sysbot+gh@w3.org>
Just came across another use case: Ability to swap variables in descendant scope.

E.g. 

```css
:root {
	--primary-color: hsl(250 30% 40%);
	--secondary-color: hsl(190 40% 40%);
}

article.alt {
	--primary-color: parent(--secondary-color);
	--secondary-color: parent(--primary-color);
}
```

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 17 May 2021 15:03:34 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:27:23 UTC