W3C home > Mailing lists > Public > public-css-testsuite@w3.org > June 2011

[RC6] Weakness of coverage of section 10.6.2; inline-replaced-height-007

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Thu, 2 Jun 2011 20:29:36 -0700
Message-ID: <e95dd120aa6c76725875c7c2fa4fb8b7.squirrel@cp3.shieldhost.com>
To: "Public CSS test suite mailing list" <public-css-testsuite@w3.org>



        <meta name="assert" content="An inline replaced elements with a
percentage height that cannot be resolved has no intrinsic

That's not true. I think the assert confuses how to resolve a percentage
height and intrinsic height. Resolving a percentage height is one thing;
having or not an intrinsic height is another and an independent issue
apart, separate from resolving a percentage height.

The meta assert should have been saying rather something like

<meta name="assert" content="If the height of an inline replaced element
is a percentage value and such inline replaced element's containing
block has no height specified explicitly, then the height of such inline
replaced element must be computed as 'auto'. If such inline replaced
element has an used width and an intrinsic ratio, then its (used) height
can be resolved, figured out; otherwise - like in this testcase - the
used value of 'height' must be set to the height of the largest
rectangle that has a 2:1 ratio, has a height not greater than 150px, and
has a width not greater than the device width.">

Maybe it's too wordy, too verbose; it could be more terse.


Assume this code and webpage situation:

The body content box is 1024px minus 8px*2 (body margin left and margin
right) - 18px for vertical scrollbar == 990px wide (available width of
body content box)

Assume that some-blue-box has an intrinsic dimensions of 100px width by
200px height (therefore an intrinsic ratio of 0.5)


   <img src="some-blue-box.png" style="width: 20%; height: 1%;" alt="">

then 'height: 1%' is computed as 'auto' (according to §10.5) since the
height of body content box is not specified explicitly.

Then the blue box should occupy a width of 990 mult 0.2 == 198px (used
width) and its height should be 396px because

if 'height' has a computed value of 'auto', and the element has an
intrinsic ratio then the used value of 'height' is:

    (used width) / (intrinsic ratio).

There are no testcases in section 10.6.2 testing such kind of scenario
for inline replaced element (typically an <img>), for inline-block
replaced element (<object>), etc.


I have a meta-testcase (30 tests) for section 10.6.2 for better
coverage. I will submit a few testcases later this month.

regards, Gérard
Contributions to the CSS 2.1 test suite:

CSS 2.1 Test suite RC6, March 23rd 2011

CSS 2.1 test suite contributors:
Received on Friday, 3 June 2011 03:30:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:13:23 UTC