[nightly-unstable] font-size-118 : 'font-size: smaller' applied with a parent with 'font-size: 160px': impossible to predict

Hello,

http://test.csswg.org/suites/css2.1/nightly-unstable/html4/font-size-118.htm

line 15  .big { font-size: 10em; }

line 17  .smaller { font-size: smaller; }

line 28    <div class="big"><div class="smaller"><div class="text">     
  </div></div></div>

The CSS 2.1 spec [1] does not specify the scaling factor involved for
'smaller' and 'larger' keywords. So, if computed font-size of .big node
is 160px, then computed font-size of .smaller could be almost any value
(lower than 160px). This gives leeway, leniency, laxism.

Browsers  : computed value for .smaller
--------    ---------------------------
Firefox 10:   106.667px (meaning a scaling factor of 1.5)
Chrome 17 :   133px     (meaning a scaling factor of 1.2)
Opera 11.6:   128px     (meaning a scaling factor of 1.25)
(I have not tested with IE8 nor IE9).

Note that .big computed font-size is already outside the table of
font-size.

So, for all those reasons, I am not sure this test is good. Its layout
rendering is definitely *not* predictable: the dimensions of the filled
green rectangle is unpredictable.

[1]:
"
In CSS1, the suggested scaling factor between adjacent indexes was 1.5,
which user experience proved to be too large. In CSS2, the suggested
scaling factor for a computer screen between adjacent indexes was 1.2,
which still created issues for the small sizes. Implementation
experience has demonstrated that a fixed ratio between adjacent
absolute-size keywords is problematic, and this specification does not
recommend such a fixed ratio.
"

Gérard
-- 
Contributions to the CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

CSS 2.1 Test suite RC6, March 23rd 2011:
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

CSS 2.1 test suite harness:
http://test.csswg.org/harness/

Contributing to to CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html

Received on Sunday, 12 February 2012 04:33:39 UTC