- From: John Daggett <jdaggett@mozilla.com>
- Date: Sun, 1 Apr 2012 19:35:02 -0700 (PDT)
- To: "Kang-Hao (Kenny) Lu" <kennyluck@csail.mit.edu>
- Cc: WWW Style <www-style@w3.org>
Kenny Lu wrote: > While reviewing css3 V&U, I found an interesting syntax corner case > related to whether 'font-weight's 100 ~ 900 values are more > <integer>-like or IDENT-like. The following declarations > > A. 'font-weight: +700;' > > B. 'font-weight: \37 00;' (CSS escaping) > > have the following results > > Firefox 11: only A applies > Chromium 18: both A and B apply > (the fact that B applies seems like a bug) > IE 9 and IE8 standards mode: only B applies > IE 7 standards mode and quirks mode: neither applies > (CSS escaping not supported, it seems) > Opera12alpha: only A applies > > CSS 2.1 says nothing about this but the natural interpretation of the > current "Value:" line seems to be "neither apples". > > I don't have a strong opinion but I suggest we match IE8 and above here. > That way, we don't need to worry whether and how calc() or attr as > integer applies in 'font-weight'. (I don't think implementers would be > be happy to implement something that's neither IDENT nor <number>.) No, matching these as identifiers would not be a good idea. The 100 .. 900 values are positive integers. These are currently restricted to multiples of 100 but it would make sense in the future to consider allowing all integral values in the [100..900] range. The OpenType spec technically allows this but in practice it's tricky to use due to inconsistent treatment (abuse?) of these values by font vendors to work around legacy platform issues (i.e. Windows GDI). As legacy platforms affected by these issues die a slow death it will hopefully be possible to allow more freedom here. I should note that your examples here are somewhat in the realm of useless testcases. But I'll add wording to the CSS3 Fonts spec to clarify that these values are positive integers and not keywords. I don't think it justifies inclusion in a 2.1 errata list. Regards, John
Received on Monday, 2 April 2012 02:35:31 UTC