W3C home > Mailing lists > Public > www-style@w3.org > December 2012

Re: [css-variables] parse-time error handling in uses of variables

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 7 Dec 2012 09:06:39 -0800
Message-ID: <CAAWBYDCFrAbapkg6wJ+QSFnVLKJvqw5EPQ90WBY3nPJi5CYw-w@mail.gmail.com>
To: Fran├žois REMY <francois.remy.dev@outlook.com>
Cc: "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>
On Thu, Dec 6, 2012 at 2:11 AM, Fran├žois REMY
<francois.remy.dev@outlook.com> wrote:
> I've an issue with this proposal. I know that this is mostly what the current specification says, but I would prefer the validation algorithm of Token Stream References to match the one of Attribute References.

This is unacceptable for several secondary use-cases for Variables,
namely using a CSS variable in JS to effectively get a "DOM-tree
scoped" JS variable, and using CSS variables as "author-prefixed"
properties that are preserved by the engine and used for polyfills.

Further, there doesn't seem to be much use in this even for pure CSS
uses of Variables.  attr() validates its fallback value at parse time
*so that it will either be discarded at parse time or guaranteed valid
at computed time*.  Even if the fallback is omitted, because we know
the value's intended type, we can provide a default fallback that will
be valid for use in that position.  We have no such ability for
Variables, so enforcing a validity requirement that doesn't even buy
us guaranteed validity seems low-value.

Received on Friday, 7 December 2012 17:07:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:24 UTC