- From: Andrew Fedoniouk <news@terrainformatica.com>
- Date: Tue, 09 Feb 2010 09:19:05 -0800
- To: "L. David Baron" <dbaron@dbaron.org>
- CC: www-style <www-style@w3.org>
L. David Baron wrote: > On Saturday 2010-02-06 23:02 -0800, Andrew Fedoniouk wrote: >> Grammar of all properties in CSS 2.1. obey this simple set of rules: >> ... > > So I don't think you can determine a clear operator precedence order > from CSS 2.1, other than perhaps (based on 'font-family' and > 'voice-family') that comma-separated things contain space-separated > things (the opposite of what you describe, but I think quite > logical). > > I think if anything it's the 'font' shorthand that's got the broken > syntax, but that's been broken (internally contradictory precedence) > since CSS1. I think it's also the one that's confusing for authors: > it recently took me quite a while to spot the mistake in: > font: 1em normal normal Arial, serif; > (Note: most people don't have a font called 'normal normal Arial'.) > > I think the general rule that: > a b, c d > represents groups like this: > (a b) (c d) > rather than like this: > a (b c) d > makes sense, and we should stick to it, leaving 'font' as an > exception. > > -David > David, thanks for the detailed analysis. If to forget about the font for a while can we assume that CSS3 property value grammar looks or will look like this?: <VALUE_COMMA_LIST> : <VALUE_SPACE_LIST> | <VALUE_COMMA_LIST> "," <VALUE_SPACE_LIST> <VALUE_SPACE_LIST> : <VALUE_OR_PAIR> | <VALUE_SPACE_LIST> S+ <VALUE_OR_PAIR> <VALUE_OR_PAIR> : <VALUE> | <VALUE> "/" <VALUE> <VALUE> : NUMBER S* | PERCENTAGE S* | LENGTH S* | EMS S* | EXS S* | ANGLE S* | TIME S* | STRING S* | IDENT S* | URI S* | hexcolor | function <PROPERTY-DECL> : <NAME> ':' <VALUE_COMMA_LIST> ';' | <NAME> ':' <VALUE_COMMA_LIST> <IMPORTANT> ';' I saw attempts to introduce '(' ')' brackets but it appears they are gone now? -- Andrew Fedoniouk. http://terrainformatica.com
Received on Tuesday, 9 February 2010 17:19:36 UTC