Re: [css-pseudo] How do you solve a problem like alt?

On 11/10/14, 7:48 PM, "James Craig" <jcraig@apple.com> wrote:

>
>> On Nov 10, 2014, at 1:31 PM, Alan Stearns <stearns@adobe.com> wrote:
>> 
>> how would this be best expressed?
>
>Spitballing…
>
>Favorite:
>content: "\foo";
>alt: attr(data-bar);
>
>Alternates:
>
>content: "\foo", alt(attr(data-bar));
>
>content: "\foo", alt attr(data-bar);

In both of these, there would be no comma. The ‘alt’ keyword (or function
name) is sufficient to separate it from the rest of the value. And I
believe we’re considering the comma for content fallbacks.

> 
>
>I think the syntax complexities of the alternates are more problematic
>than the possibility that alt might not cascade perfectly in some edge
>cases. Authors understand alt pretty well already; a new CSS property
>seems the most logical to me.

It’s definitely the simplest syntax, and I agree that the cascade issue is
not huge. If an author starts adding alt text to their generated content,
being consistent isn’t that difficult. And if there ends up being any
other reason to allow CSS to set an alt value, extending what the property
applies to is simpler than adding a keyword/value to some other value
syntax.

> 
>
>I’m curious if Tab will weigh in since alt was his suggestion originally.

He’s been on vacation and successfully avoiding email. I expect he’ll
catch up with this by the end of the week.

Thanks,

Alan

Received on Tuesday, 11 November 2014 04:06:00 UTC