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

Re: [css3-variables] Fallback vs. "invalid at computed-value time"

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Sun, 24 Feb 2013 15:45:33 +0100
Message-ID: <512A278D.4080102@kozea.fr>
To: François REMY <francois.remy.dev@outlook.com>
CC: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
Le 24/02/2013 15:12, François REMY a écrit :
> The reality check is however that it doesn't work very well. Consider:
>
>      selector {
>          var-index: 1;
>      }
>
>      selector {
>          var-position: attr(data-js-computed-position);
>          var-position: calc(3 * var(index)) !type(length);
>      }
>
> It's impossible to validate var-position at parse time.

I think you’d also need a type constraint on the var-index declaration 
in this example.

But yeah, I see your general point: this mechanism might not be enough, 
short of defining dozens of keywords for all variants of ranges of 
accepted values.


-- 
Simon Sapin
Received on Sunday, 24 February 2013 14:45:59 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:06 GMT