Felix Miata wrote:

And so my question seems to
remain unanswered by the mud above. Let me rephrase my question:

html body {font-size: 80%}
p.one {font-size: 80%}
p.two {font: 80% sans-serif; }
...
<p class="one">From reading the CSS spec, I expect this to be 64% of the browser default.</p> <p class="two">From reading the CSS spec, I expect this to be 80% of the browser default.</p>

Class two should be the same size as class one, according to the spec. Why should they be the same size? The spec describes an algorithm that works like this:

1. When encountering the font shorthand, reset all font values to the initial values, but don't yet compute results. 2. Read the specified values in the shorthand rule, and substitute those explicit values for any that were reset in step 1.
3. Compute the results according to normal rules of inheritance.

My real question is the meaning of initial. If it doesn't refer to the
browser default, what is the purpose of the reset that the font property
provides? Of what use is its reset function?

It does refer to the browser default, but since font-size is required in the shorthand, font-size is always explicitly set and the browser default never applies. On the other hand, let's change your example a bit:

html body {font-style: italic; }
p.one {font-style: oblique; }
p.two {font: 100% sans-serif; }

<p class="one">This paragraph will be in the default font face and oblique.</p>
<p class="two">This paragraph will be in the browser's sans-serif font face, which is probably not the browser default, because that (required) value was explicitly specified. However, this paragraph will also be in normal style rather than italic or oblique, because that value has been reset by the algorithm and was NOT explicitly specified.</p>

Hopefully, that example makes it more clear. If not, I'm happy to try again, but it would probably be better to take it off list until I can come up with an answer that you agree makes sense! :-)

--

-Adam Kuehn
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to