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

Re: attr(x, y)

From: James Craig <work@cookiecrook.com>
Date: Mon, 29 Sep 2003 10:14:59 -0500
Message-ID: <3F784C73.6070809@cookiecrook.com>
To: www-style@w3.org
Cc: Roland Tepp <roland.tepp@mail.ee>

Roland Tepp wrote:

> Now I'm not really that fluent, as I allready mentionedd before, in understanding all
> the ugly details of parsing CSS, but to my everyday user (and programmer)
> point of view this looks rather wrong - afaik this form of string
> concatenation is not allowed today, so why should it be allowed in CSS3?
> (please correct me if I'm wrong...)

The syntax was correct and it is allowed today in some circumstances. 
Take this example that works in modern browsers (Not IE):

/* href value starts with '/' */
a[href^="/"]:after {
   content: " (http://www.mydomain.com" attr(href) ")";

Would take this element:
  <a href="/foo.htm">Link text</a>

And print:
  Link text (http://www.mydomain.com/foo.htm)

James raig

Received on Monday, 29 September 2003 11:15:06 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:09 UTC