Re: [css3-values] Suggestion: Allowing attr() in calc()

On 9/1/10 3:26 PM, Lea Verou wrote:
>> The second argument (which is optional but must be present if the
>> third argument is present) is a <type> and tells the UA how to
>> interpret the attribute value. It may be one of the values from the
>> list below.
> (from http://dev.w3.org/csswg/css3-values/#ltattrgt)

Ah.  That sounds unfortunately slow, but ok.

> So what I'm saying is that if the type of the attribute as defined in
> the markup spec (or if it's not defined at all) is "string", and attr()
> is called on it without a 2nd parameter, then it could either be
> considered a parse error (which would be more consistent with how attr()
> is currently proposed) or interpreted as a number, if possible (which is
> more useful).

With some sort of fallback for values that can't be interpreted as numbers?

> Am I making sense now?

Yes, but I'm not sure what the use cases are, honestly...

-Boris

Received on Wednesday, 1 September 2010 19:32:59 UTC