W3C home > Mailing lists > Public > www-style@w3.org > February 2012

[css3-fonts] Grammar for font-variant shorthand

From: Lea Verou <leaverou@gmail.com>
Date: Thu, 02 Feb 2012 09:51:00 +0200
Message-ID: <4F2A4064.3050502@gmail.com>
To: www-style list <www-style@w3.org>
As it currently stands, the grammar is this:

normal | inherit | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic(<feature-value-name>) || historical-forms || styleset(<feature-value-name> [, <feature-value-name>]*) || character-variant(<feature-value-name> [,<feature-value-name>]*) || swash(<feature-value-name>) || ornaments(<feature-value-name>) || annotation(<feature-value-name>) || <caps-value> || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]

I think it would be much more readable if it was formatted a bit better, especially if the tokens were grouped by property. For example:

normal | inherit | 
[
  <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> 
  || <caps-value>
  || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero
  || <contextual-alt-values> || stylistic(<feature-value-name>) || historical-forms || styleset(<feature-value-name> [, <feature-value-name>]*) || character-variant(<feature-value-name> [,<feature-value-name>]*) || swash(<feature-value-name>) || ornaments(<feature-value-name>) || annotation(<feature-value-name>)
  || <east-asian-variant-values> || <east-asian-width-values> || ruby 
]

Of course, it would be even more readable if it just listed normal | inherit | <...the individual properties...> like most shorthands, but I guess that has issues with the ambiguous `normal` value :(

-- 
Lea Verou (http://lea.verou.me | @LeaVerou)
Received on Thursday, 2 February 2012 07:51:40 GMT

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