- From: Nicholas Shanks <contact@nickshanks.com>
- Date: Wed, 27 Aug 2008 22:32:58 +0200
- To: www-style@w3.org
I would like to make a proposal for an extension to the generic font family part of the css3-fonts specification. The ‘monospace’ generic family should be seen as orthogonal to ‘serif’ and ‘sans-serif’ in the generic font‐family fallback keywords. Both monospace, and its converse ‘proportional’ would be allowed to be specified in conjunction with serif or sans‐serif (in either order). Proportional is to be assumed if absent. I envisage sites using it in this way: code { font-family: "Consolas", monospace serif, monospace; } /* good for 1/l/I/O/0 */ code .comment { font-family: monospace sans-serif, monospace; } /* distinctive from code */ code .headerdoc { font-family: "Constantia", proportional, sans- serif; } /* good for prose */ Where, for example a UA without the ClearType fonts installed, rendering the <code> element, would recognise ‘monospace serif’ as meaning “use Courier, but not Andale Mono.” Older UAs would look for a font called "monospace serif", not find one, and fall back to the CSS2.1 generic family, monospace. If older UAs did find a font family exactly called "monospace serif" then I would guess from the name that it too would be suitable! Similarly, the introduction of the ‘proportional’ keyword is to override the inherited monospace state (in my example all elements in the headerdoc class would also be in the comment class). It would not alter the serif/sans‐serif axis state, so the sans‐serif state of class .comment would be inherited when not explicitly stated. This concept could be further extended to distinguish between ‘serif cursive’ (Monotype Corsiva, Vivaldi) and ‘sans-serif cursive’ (Bradley Hand, Tempus Sans). The fallback style for older UAs would be ‘cursive’, and must still be supplied by the web developer. I don't expect this to be applicable to the ‘fantasy’ family, however, which may always be considered sans‐serif. Here are some prior requests by myself to people who I thought might be listening, but aparently weren't. They basically repeat what I wrote above, but less thoughtfully. http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2006-July/006859.html https://bugs.webkit.org/show_bug.cgi?id=17069 A CSS mailing list post I thought I had made several years earlier covering the same seems to have fallen between the digital cracks though. — Nicholas Shanks.
Received on Wednesday, 27 August 2008 20:33:37 UTC