Re: attr(<identifier>)

"Tab Atkins Jr." <[email protected]> Mon, 21 Sep 2015 13:20:55 -0700
Newsgroups gmane.org.w3c.validator.css,gmane.comp.web.css.general
Message-ID <CAAWBYDDkjpxNd9r8Ax51_YYdkcS9nr3MhpnsCe+97bHrBa9_pA@mail.gmail.com>
On Mon, Sep 21, 2015 at 11:48 AM, Jens Oliver Meiert <[email protected]> wrot=
e:
> (CC www-style for spec may be ambiguous)
>
> The CSS validator throws parse errors for constructs like
>
> a[href^=3D'http']:after {
>   content: ' <' attr(href) '>';
> }
>
> (Same for =E2=80=9Ccontent: ' \003C' attr(href) '\003E';=E2=80=9D=E2=80=
=94both should work
> from what I can tell.)
>
> Two of the relevant documents I checked [1,2] seem blissfully unclear
> about concatenation, however it appears (per samples like =E2=80=9Cstring=
-set:
> author attr(author);=E2=80=9D) that this is, indeed, valid CSS.
> Implementations (WebKit) support that notion, for the code is
> supported.
>
> Unless I=E2=80=99m missing something, can the validator team look into th=
is,
> and the CSS working group clarify if necessary?
>
> Cheers,
>  Jens.
>
>
> [1] http://www.w3.org/TR/CSS21/generate.html
> [2] http://www.w3.org/TR/css3-content/

You're correct, that's definitely valid.  This is clear in the 2.1
grammar - there's a long list of string-ish things wrapped in a []+,
which indicates you can use one or more, space-separated.

I'm unsure about who maintains the validator, but I guess you hit the
right mailing list.

~TJ