- From: Roland Steiner <rolandsteiner@google.com>
- Date: Thu, 3 Nov 2011 11:58:36 -0700
- To: www-style@w3.org, "Tab Atkins Jr." <jackalmage@gmail.com>
Received on Thursday, 3 November 2011 19:15:42 UTC
Hi all,
Reading though the new variables spec (
http://dev.w3.org/csswg/css-variables/), section 3.1, and examples 7 and 8
specify that a property that is invalid at computed value time must
evaluate to the property's initial value. IMHO this should rather be
specified that the property is ignored (in line with invalid values in
http://www.w3.org/TR/css3-values/) or perhaps evaluate to its default
value, instead. (Inasmuch I think that using 'background-color' in those
example is a bit unfortunate, as it'd evaluate to 'transparent'.)
Apart from giving surprising results (IMHO), evaluating to the initial
value would also prevent use cases like the following:
.foo {
color: red; // default value
color: data(override-color); // override only if declared
}
.bar {
background-color: black;
background-color: data(bg-color);
background-color: linear-gradient(from top left to bottom right,
data(from-color) 0%, data(to-color) 100%);
}
Cheers,
- Roland
Received on Thursday, 3 November 2011 19:15:42 UTC