[CSS2.1] abs. pos. inline-block replaced element's height set to a percentage

Hello,

1-

http://test.csswg.org/suites/css2.1/nightly-unstable/html4/absolute-replaced-height-014.htm

Is this test correct?


2-
An iframe, which is an inline-block replaced element, does not have an
intrinsic height, does not have an intrinsic width and does not have an
intrinsic ratio. So, how could it have, under any circumstances, an
intrinsic height, like the assert text is suggesting?

3-
In that test, the div#containing-block's height is 'auto'. And it is
resolvable: it is 0 in that test. Because
"
(...)
the height of the containing block of an absolutely
positioned element is independent of the size of the element itself,
and thus a percentage height on such an element *_can always be
resolved_*. However, it may be that the height is not known until
elements that come later in the document have been processed.
"
http://www.w3.org/TR/CSS21/visudet.html#the-height-property

Is my reasoning correct?

And what should be the consequences of writing in the spec that a
percentage height on the containing block of an absolutely
positioned element *_can always be resolved_* ?


4-
Nowhere do I see in the spec that a percentage of the height of a
containing block (whose height is not resolvable) must be 0.

What am I missing here?


================


http://www.gtalbot.org/BrowserBugsSection/css21testsuite/absolute-replaced-height-014a-GT.xht


http://www.gtalbot.org/BrowserBugsSection/css21testsuite/absolute-replaced-height-014b-GT.xht


In those 2 tests, the height of div#containing-block is 'auto'. I have
intentionally added a 400px tall image in it. And then I test the
rendering of <iframe height="50%"> (which has red borders). Now, if the
height of div#containing-block was *not* resolvable, we would see red
borders but we don't. The height of the div#containing-block is resolved
to be 400px. And so <iframe height="50%"> is rendered in a predictable
manner.


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

Contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

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

Received on Tuesday, 4 September 2012 00:54:45 UTC