Re: [css-variables] Empty variable values?

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.

~TJ

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