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

[csswg-drafts] [css-variables] Empty custom property (--) works in every browser, against spec (#6313)

From: Lea Verou via GitHub <sysbot+gh@w3.org>
Date: Wed, 26 May 2021 09:36:55 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-902100746-1622021814-sysbot+gh@w3.org>
LeaVerou has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-variables] Empty custom property (--) works in every browser, against spec ==
[Per spec](https://drafts.csswg.org/css-variables/#defining-variables), the `--` custom property is reserved by CSS for future use:
> The `<custom-property-name>` production corresponds to this: it’s defined as any `<dashed-ident>` (a valid identifier that starts with two dashes), **except `--` itself, which is reserved for future use by CSS**.

However in my testing it works in every browser ([testcase](https://codepen.io/leaverou/pen/vYxZWYj)), as yet another property, and is already used by people in situations where brevity is important (it was brought to my attention from a https://cssbattle.dev solution ).

What should we do? Should we file bugs with all UAs and hope for the best, or change the spec?

ping @tabatkins 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6313 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 26 May 2021 09:37:00 UTC

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