Re: [css3-fonts] font-variant-numeric

On 03/23/2010 10:50 PM, John Daggett wrote:
>
> fantasai wrote:
>
>> 1. Grammar is too loose.
>>
>> The current spec specifies
>>    #<numeric-values>  = [lining-nums | oldstyle-nums | proportional-nums | tabular-nums
>>    #                    | diagonal-fractions | stacked-fractions | slashed-zero]+
>>
>> But some of these pairs are mutually exclusive, and there's no reason any one
>> keyword should be specified more than once. The grammar should be
>>
>>    |<numeric-values>  = [ lining-nums | oldstyle-nums ] || [ proportional-nums | tabular-nums ]
>>    |                    || [ diagonal-fractions | stacked-fractions ] || slashed-zero
>
> Yes, I agree this is nicer, as Christoph has pointed out.  However, the
> one problem I see with this is that font-variant is still a shorthand
> that could take multiple <numeric-values>.  So the usage below would be
> handled inconsistently between the 'font-variant-numeric' and the
> 'font-variant' shorthand:
>
>    font-variant:         lining-nums tabular-nums slashed-zero oldstyle-nums;
>    font-variant-numeric: lining-nums tabular-nums slashed-zero oldstyle-nums;
>
> With your definition, the second one would be valid syntax, the first would not.

I'm not sure what you're getting at here. They should both be invalid, because
lining-nums and oldstyle-nums are mutually exclusive.

Meaning, font-variant's grammar should be rewritten as

normal | inherit | [ <ligature-values> || <alternates-values> || <caps-value>
                    || <numeric-values>  || <east-asian-variations> ]

>> This makes the following sentence redundant:
>>     # The values ‘lining-nums’ and ‘oldstyle-nums’ are mutually exclusive,
>>     # as are ‘proportional-nums’ and ‘tabular-nums’, ‘diagonal-fractions’
>>     # and ‘stacked-fractions’.
>> It should therefore be removed.
>
> Nope, this is still needed because @font-face font-variant settings
> and general property font-variant settings have to be resolved, see
> section 7 of the spec.

Ok.

>> 2. Keyword definitions too terse.
>
> Yes, I was waiting until I felt there was agreement on the set of
> features before adding more descriptions.
>
>> a) Several of these terms have reasonably-common alternatives, which
>> should be added in parentheses so that people looking for this feature
>> can find and recognize it easily.
>
> I'm not at all clear what you mean here.

For example, oldstyle numerals are also called lowercase numerals, so you
could write:

   Enables rendering of old-style (lowercase) numerals

~fantasai

Received on Wednesday, 24 March 2010 07:41:52 UTC