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

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

From: Lea Verou via GitHub <sysbot+gh@w3.org>
Date: Tue, 05 Jan 2021 21:21:35 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-754906606-1609881693-sysbot+gh@w3.org>
I was not suggesting we go with brackets + `<dashed-ident>`. I'm aware that attributes can start with `--`. I think it would be confusing to have a syntax similar to attribute selectors but for custom properties, even if selectors were fair game for this (which they are not). I was merely saying that if we go with a syntax that only allows comparison with custom property values, and not comparison between any CSS values, then requiring `var()` around it is pointless, unless we also want to allow for fallbacks, or to allow future extensibility.

There is nothing inherently imperative about conditionals, people are just pattern matching on superficial syntax. The distinction between imperative and declarative is deeper, and not actually that strictly defined if you look into it. The high level definition is that imperative tells the computer *how* to do something, whereas declarative *what* to do. Furthermore, CSS already has conditionals: `@supports` and `@media`, which can also be nested inside regular style rules, per [css-nesting]. There is nothing more inherently imperative in conditionals that depend on value comparison instead of feature support or user environment.

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

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 5 January 2021 21:21:38 UTC

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