[CSS21] font-family: inheritance and missing fonts

Given this stylesheet:

  p    { font-family: Courier; }
  span {	font-family: Foo; }

with the font "Courier" existing on the system and the font "Foo" not
existing, in which font should "Text." render in this XHTML code:

		<p><span>Text.</span></p>

?

The spec obviously leaves room for interpretation.


** Interpretation 1: **

"Text." renders in "Courier", because

1. font-family is inherited
2. the declaration-block for span effectively becomes empty since "Foo"
is an invalid value for the property font-family on this system since the
font does not exist, and therefore "Courier" is inherited from <p>.

Supporters: 
 - Opera 7.54u2 (Mac OS X)
 - IE 6.0.2800.1106 (Windows 2000)


** Interpretation 2: **

"Text." renders in font-family's initial value, because

1. the declaration-block for span remains as written since "Foo" is a
valid value for the property font-family in CSS (even though on this
particular system, it cannot be satisfied). 
2. However, since the property is explicitly set, it breaks any
inheritance (overwrites the value) from its ancestor. Therefore, the font
matching algorithm applies, which then leads to font-family's UA-
dependent default as the last resort, since the font actually specified
is not available.

Supporters:
 - Firefox 1.0 (Gecko/20041107 Firefox/1.0, Mac OS X)
 - IE 5.2.3 (5815.1, Mac OS X)
 - Safari 1.2.4 (v125.12)
 - Mozilla 1.3b (Gecko/20030212, Mac OS X)


Note that the respective "supporters" section has been filled based
solely on visual results and not by examining a browser's source code (of
course :-)). This means that the respective UA might not be actually
"support"ing the view (but e.g. just have a bug).

Since I haven't found a test for the mentioned case in the suites
available, what is the intended result (and why)?

Regards, Christian.

Received on Wednesday, 23 March 2005 20:52:56 UTC