W3C home > Mailing lists > Public > www-style@w3.org > June 2009

Re: [CSS21] 15.3 font-family: undefined keywords

From: Giovanni Campagna <scampa.giovanni@gmail.com>
Date: Sat, 13 Jun 2009 16:19:46 +0200
Message-ID: <65307430906130719x101422d9ya77ec9336e8cb301@mail.gmail.com>
To: Kristof Zelechovski <giecrilj@stegny.2a.pl>
Cc: www-style@w3.org
2009/6/13 Kristof Zelechovski <giecrilj@stegny.2a.pl>:
> Section 15.3 Font family: the 'font-family' property says:
> Font family names that happen to be the same as a keyword value (e.g.
> 'initial', 'inherit', 'default', 'serif', 'sans-serif', 'monospace',
> 'fantasy', and 'cursive') must be quoted to prevent confusion with the
> keywords with the same names.
> However, the keywords 'initial', 'default' are undefined, neither under
> Assigning property values, Cascading, and Inheritance nor here.  Internet
> Explorer does not support them and initial | -moz-initial - MDC says
> 'initial' belongs to CSS3.
> I recommend not mentioning those keywords here to prevent confusion.

If CSS2 does not mention those, people may start using them as font
names, and the deployment of CSS3 will break that.

> By the way, do inherited and overridden font family declarations get
> appended to the font set?  By [CSS21] font-family: inheritance and missing
> fonts from Christian Roth on 2005-03-23 (www-style@w3.org from March 2005),
> IE5 appends, IE6 replaces, and my observation is that IE8 appends again, so
> I am lost.  Additionally, there is no test for the font matching algorithm
> at the CSS 2.1 Test Suite: Index by Section, so it is really hard to tell.

The Computed Value of font-family is "as specified". So the computed
value of "font-family: foo" is "foo", regardless of the presence or
absence of a font-family named "foo" in the system (or in the set of
valid @font-face rules). And, at the time the Computed Value is found,
you have lost any information from inheritance.

OTOH, if "font-family" does not match anything available, as per 15.2
Font Matching Algorithm, step 5, the UA may choose any font, which may
be exactly that inherited, if the UA has still such information.

> Thanks in advance,
> Chris

Received on Saturday, 13 June 2009 14:20:18 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:27 UTC