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