W3C home > Mailing lists > Public > www-style@w3.org > September 2010

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

From: Lea Verou <leaverou@gmail.com>
Date: Wed, 01 Sep 2010 22:26:39 +0300
Message-ID: <4C7EA8EF.90202@gmail.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: www-style@w3.org

> On 9/1/10 3:19 PM, Lea Verou wrote:
>> Oh, right. As things currently stand, I guess it should be a parse error
>> then (in the 2nd case), unless a type is explicitly specified.
>
> Ah... are we using "type" to mean two different things here, perhaps?  I had assumed you were talking about types of attributes as defined in the markup language spec (e.g. HTML does this for various attributes).  Are you talking about some other type?
>
> -Boris
I'm talking about both. From my understanding, you can override the type of the attribute as defined in the markup language spec by providing a second parameter to attr():
> 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)

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).

Am I making sense now?

-- 
Lea Verou
Blog: leaverou.me <http://leaverou.me>
Twitter: http://twitter.com/LeaVerou
LinkedIn: http://gr.linkedin.com/in/leaverou
Received on Wednesday, 1 September 2010 19:27:37 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:31 GMT