W3C home > Mailing lists > Public > www-style@w3.org > February 2013

Re: [css-variables] Empty variable values?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 6 Feb 2013 21:35:34 -0700
Message-ID: <CAAWBYDAVNBrWvzVc9WvEgqeJTxUG8trXoomGbQBcqFrWuVZYvQ@mail.gmail.com>
To: Glenn Adams <glenn@skynav.com>
Cc: Simon Sapin <simon.sapin@kozea.fr>, www-style list <www-style@w3.org>
On Wed, Feb 6, 2013 at 1:08 PM, Glenn Adams <glenn@skynav.com> wrote:
> Notice the former returns null and the latter returns the empty string "if the property has not been explicitly set". Here, "explicitly set" is referring to the CSSStyleDeclaration returned from ElementCSSInlineStyle.style, and means "explicitly set in a source style rule or explicitly set by mutating ElementCSSInlineStyle.style.cssText, etc.
> So, with the suggested syntax, one can no longer distinguish between explicitly set or set to /*empty*/.

I'm fine with switching the internal magic over to
getPropertyCSSValue() and thus returning null for unset things.

Like I said, though, it *is* already possible, using the style.var
object, to tell if a var has been set or not, because all the
explicitly set variables will collectively produce the named property
list for the object.

Received on Thursday, 7 February 2013 04:36:21 UTC

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