Re: [CSS21] 10.1: Issues with "containing block"

On Sat, Oct 23, 2010 at 07:13:55AM +1100, Peter Moulder wrote:

>     So one test case would involve a position:absolute element with a
>     display:block parent that in turn has a display:inline position:relative
>     parent.

The result of that test is that the containing block for Gecko is based on the
display:inline position:relative element that was split (so is apparently based
on element tree), while in Konqueror/WebKit/Chromium, the containing block in
the test was the initial containing block, presumably indicating that it's
going by box tree ancestry.

I noted previously that the editors' draft made the change

  "[If] the ancestor is inline-level"
 ->
  "[If] the ancestor is an inline box",

though note that the editors' draft is still written in terms of an element,
i.e. the new text might more completely be written as:

  "[If] the ancestor [of the element] is an inline box"

so it's still rather unclear as to whether the spec is asking for box tree
ancestry or element tree ancestry, i.e. it's still unclear whether Gecko or
Konqueror and its descendants have the "right" behaviour.

Obviously this an implementability issue for CSS2.1: one cannot implement
section 10.1 without knowing what the containing block for the
position:absolute element is, and hence what its left coordinate is.

pjrm.


<html>
<head>
<title>Test of position:absolute containing block when closest element differs from closest box</title>
</head>
<body>
<p>Here is a paragraph containing a <span style="position:relative;">position:relative span that is split by a <span style="display:block">block-level element that contains a <span style="left:0; position:absolute; background-color:cyan;">position:absolute span</span> ... <br /> in the middle of it</span> before this remainder of the position:relative span</span> and the rest of the paragraph.</p>
</body>
</html>

Received on Monday, 29 November 2010 06:53:40 UTC