Re: [CSS21] 10.1 Containing block: when "the ancestor is an inline element": editorial improvements

On 8/03/2012 4:10 PM, "Gérard Talbot" wrote:
> Hello,
>
> Section 10.1, bullet 4 (with sub-bullets 1 and 2)
> http://www.w3.org/TR/CSS21/visudet.html#containing-block-details
>
> Current text is:
>
> {
> 4. If the element has 'position: absolute', the containing block is
> established by the nearest ancestor with a 'position' of 'absolute',
> 'relative' or 'fixed', in the following way:
>
>    1.  In the case that the ancestor is an inline element, the containing
> block is the bounding box around the padding boxes of the first and the
> last inline boxes generated for that element. In CSS 2.1, if the inline
> element is split across multiple lines, the containing block is
> undefined.
>    2.  Otherwise, the containing block is formed by the padding edge of the
> ancestor.
> }
>
>
> Proposed replacement (the pairs of ** indicate where editorial changes
> would be):
>
> {
> 4. If the element has 'position: absolute', the containing block is
> established by the nearest ancestor with a 'position' of 'absolute',
> 'relative' or 'fixed', in the following way:
>
>    1. *In case such nearest positioned ancestor is an inline element, then*
> the containing block is the bounding box around the padding boxes of
> the first and the last inline boxes generated for that element. In CSS
> 2.1, if the inline element is split across multiple lines, the containing
> block is undefined.
>
>    2. *In case such nearest positioned ancestor is a block container, then*
> the containing block is formed by the padding edge of such block
> container.
> }
>
>
> What can definitely create confusion and misinterpretation is this
> proposition:
> "In the case that the ancestor is an inline element (...)"
> when the proposition should at least explicitly identify such ancestor as
> "the nearest positioned ancestor".
>
> Gérard

Gérard, there is confusion in that part of the testsuite (test that are 
not testing what they purport to test) and section 10.1. That part of 
the spec (with point 4.1) and the assert for containing-block-011.htm is 
better suited for this test.

http://test.csswg.org/suites/css2.1/20110323/html4/containing-block-017.htm

   (IE9, Safari 5.1.2 and Opera 11.61 pass)


To follow what that test is testing, examine a simpler test.

   (IE9, Safari 5.1.2 and Opera 11.61 pass ltr)
   (IE9 and Safari 5.1.2 pass rtl)

http://css-class.com/test/temp/containing-block-inline.htm


Or this one by Bruno.

   (IE9, Safari 5.1.2 and Opera 11.61 pass)

http://www.brunildo.org/test/inline-cb.html


Note how the wording of section 10.1, point 4.1 has changed:

Current:

   | In the case that the ancestor is an inline element,
   | the containing block is the bounding box around the
   | padding boxes of the first and the last inline boxes
   | generated for that element. In CSS 2.1, if the inline
   | element is split across multiple lines, the
   | containing block is undefined.

Previous:

http://www.w3.org/TR/2010/WD-CSS2-20101207/visudet.html#containing-block-details

   (note that this is point 4.1.1)

   | If the 'direction' is 'ltr', the top and left of the
   | containing block are the top and left padding edges
   | of the first box generated by the ancestor, and the
   | bottom and right are the bottom and right padding
   | edges of the last box of the ancestor.

   | Note: This may cause the containing block's width
   | to be negative.


Some history on these test and the testsuite regarding 10.1.

http://lists.w3.org/Archives/Public/public-css-testsuite/2010Dec/0203.html

And a familiar looking test below which is identical to 
containing-block-011.htm apart from the assert.

http://test.csswg.org/suites/css2.1/20101027/html4/containing-block-017.htm



-- 
Alan Gresley
http://css-3d.org/
http://css-class.com/

Received on Friday, 9 March 2012 04:59:51 UTC