W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2020

Re: [csswg-drafts] [css-variables?] Higher level custom properties that control multiple declarations (#5624)

From: François REMY via GitHub <sysbot+gh@w3.org>
Date: Wed, 09 Dec 2020 17:52:17 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-741943631-1607536336-sysbot+gh@w3.org>
Regarding Tab's proposal, we can do slightly better, and copy the value preceding the `@if` as a fallback:
my-input {
        color: blue;
	@if (var(--pill) = on) {
		color: green;
would be either `blue` or `green`, by filling the fallback part of the `cond` with the already-existing value in the declaration (and only in the declaration, not across another selector, so that would still be a limitation, just a more convenient one because it allows to specify a default.

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

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 9 December 2020 17:52:19 UTC

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