RE: [css3-variables] review comments on latest draft


[John Daggett:]
> 
> > The valid possible values of a variable property are almost completely
> > unrestricted. 

Arron loves to write testcases for anything 'almost completely unrestricted' :)

More seriously this sentence seems both confusing and unnecessary given what 
follows, which is the clear normative part. John, any example(s) of your concern?

> >
> > A declaration that is invalid at computed-value time results from
> > either using an invalid variable in a property value, or using a valid
> > variable that produces an invalid declaration when it is substituted
> > in. When this happens, the declaration must compute to the property's
> > initial value.
> 
> This ends up changing CSS semantics in some fairly subtle ways which I
> think you should explicitly note.  Specifically, invalid declarations with
> variables behave differently from invalid declarations without:
> 
> /* without variables */
> 
> p        { color: blue; }
> p > span { color: 3px;  }  /* invalid ==> color == blue */
> 
> /* with variables */
> 
> :root    { var-span-color: 3px; }
> p        { color: blue; }
> p > span { color: var(span-color); }  /* invalid ==> color == black */
> 

This is both subtle and surprising. Why shouldn't/can't it be blue?

Received on Tuesday, 22 May 2012 15:08:43 UTC