W3C home > Mailing lists > Public > www-style@w3.org > March 2010

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

From: John Daggett <jdaggett@mozilla.com>
Date: Wed, 24 Mar 2010 18:57:01 -0700 (PDT)
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style@w3.org
Message-ID: <787370552.28029.1269482221551.JavaMail.root@cm-mail03.mozilla.org>
fantasai wrote:

> 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> ]

That has the downside that this would be invalid:

  font-variant: oldstyle-nums additional-ligatures slashed-zero;

This is because 'oldstyle-nums' and 'slashed-zero' are both from the
<numeric-values> production.

Stated generally, I don't think the double-bar operator used in CSS
grammar rules is associative:

  (a || b) || c  !=  a || (b || c)

In one case 'c a b' would be valid, in the other not.

I guess one solution would be to simply expand out the full list of
mutually exclusive properties but I think there's still a risk that
cutting-and-pasting authors could accidently introduce invalid
font-variant strings.  My initial grammar simply allowed multiple
mutually exclusive values in the syntax and resolved it at use, with
the later value taking precedence.
Received on Thursday, 25 March 2010 01:57:35 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:25 GMT