W3C home > Mailing lists > Public > www-style@w3.org > May 2012

Re: [css3-values] The types "id" and "idref" for attr()

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 21 May 2012 11:12:14 -0700
Message-ID: <CAAWBYDBVW_zxem-fgK2VxTJ7djvWO3CZ8XoFSYZZEnkGjJ7d5Q@mail.gmail.com>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Cc: Werner Donné <werner.donne@pincette.biz>, www-style@w3.org
On Mon, May 21, 2012 at 8:23 AM, Bjoern Hoehrmann <derhoermi@gmx.net> wrote:
> * Werner Donné wrote:
>>Section 8.3 defines the attr() function, where the name of the attribute
>>can be followed by a type. Since CSS can also be applied to XML in
>>general, the types "id" and "idref" would be natural additions to the
>>list of type keywords.
>
> The purpose of the type parameter is to turn the string value of an
> attribute into a value in the CSS type system, so example='7' with
> a style sheet like
>
>  example { example: attr(example ...) }
>
> might be interpreted as any of the following
>
>  example { example: 7      }
>  example { example: \37    }
>  example { example: "7"    }
>  example { example: 7em    }
>  example { example: url(7) }
>  ...
>
> CSS currently does not have special syntax to signify an "id" or an
> "idref", so it would not be meaningful to have a string value inter-
> preted that way.

That's not quite true.  The UI module has the 'nav-up/left/down/right'
properties, which can take an id selector.  The Images 4 module has
the element() function, which takes an id selector and returns an
<image>.

~TJ
Received on Monday, 21 May 2012 18:13:25 GMT

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