Re: [css-counter-styles] allow use of CSS4 "alt" property with @counter-style/symbols

On Fri, May 23, 2014 at 6:23 PM, Xidorn Quan <quanxunzhen@gmail.com> wrote:
> On Sat, May 24, 2014 at 4:29 AM, Tab Atkins Jr. <jackalmage@gmail.com>
> wrote:
>> If we were going to address this directly, my thought would be to add
>> a class of 'alt-*' descriptors that must match up index-for-index with
>> the 'symbols' or 'additive-symbols' descriptor.  Then you could do:
>>
>> @counter-style io {
>>   system: cyclic;
>>   symbols: '⋗' '⋖';
>>   speak-as: words;
>>   alt-en: "Input: ", "Output";
>>   alt-es: "Entrada: ", "Salida: ";
>>   alt-de: "Eingang: ", "Ausgang: ";
>> }
>>
>> When speaking a counter-style, if an appropriate alt-* descriptor
>> exists whose language descriptor matches the element's language (using
>> the standard :lang() matching rules), it uses those symbols for
>> reading rather than the ones specified in 'symbols'.  That's pretty
>> simple to deal with.
>
>
> If we truly want to add "alt", I don't think we need to make it a class of
> descriptors. Simply using "alt" with "extends" system like what we currently
> do is sufficient. It has simplified the case to:
>
> @counter-style io-en { system: extends io; alt: "Input: " "Output: " }
> @counter-style io-es { system: extends io; alt: "Entrada: " "Salida: "; }
> @counter-style io-de { system: extends io; alt: "Eingang: " "Ausgang: "; }

This approach means that you have to use :lang() selectors in every
single place you want to use the counter style.  That seems like a bad
thing to require if we're trying to make this case easier.  I'd prefer
to either keep it how it is (somewhat verbose, but built on existing
functionality) or make it as easy as possible to address; sitting
somewhere in the middle isn't worthwhile imo.

> As Reece said, authors may also want to have different
> prefix/suffix/negative for different languages. I don't see any difference
> from usecase between the proposed "alt" and those descriptors.

True, that suggests that we probably want to hold off on 'alt' and
design it better in the next version.

~TJ

Received on Saturday, 24 May 2014 22:29:22 UTC