W3C home > Mailing lists > Public > www-style@w3.org > December 2014

Re: UNS: [Moderator Action] [css-pseudo] allowed values for CSS alt

From: Alan Stearns <stearns@adobe.com>
Date: Mon, 1 Dec 2014 23:16:17 +0000
To: Michiel Bijl <michiel@agosto.nl>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <D0A23628.21CD2%stearns@adobe.com>
On 11/5/14, 2:01 AM, "Michiel Bijl" <michiel@agosto.nl> wrote:

>Bruce Lawson brought the new alt attribute for generated content to my
>attention on Twitter[1]. With all these icon fonts that float around the
>web, I think it is a good thing you can specify an alt text. This does
>bring up some concerns, though. As Bruce stated on Twitter[2]:
>
>> Content in CSS *is* yuck. But the foo:before {content: "blah"} ship
>> has sailed.
>
>I do agree that content in CSS is yuck, but can definitely see the
>advantages of generated content. 'content:' within ::before and ::after
>takes a couple of values, one of which is 'attr(<identifier>)' [3]. This
>way you can use the content of an attribute on the element the rule
>applies to. I suggest we add the same value to the 'alt' attribute [4].

This is already covered by the alt property taking a <string> value, as
the attr() function returns a string:

http://dev.w3.org/csswg/css-values/#funcdef-attr


Thanks,

Alan

Received on Monday, 1 December 2014 23:16:48 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:49 UTC