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

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