Re: [CSS Intrinsic & Extrinsic Sizing] sizing of absolutely positioned elements

Le Mar 9 octobre 2012 17:39, Ojan Vafai a écrit :
> On Tue, Oct 9, 2012 at 1:55 PM, Tab Atkins Jr. <jackalmage@gmail.com>
> wrote:
>
>> On Fri, Sep 7, 2012 at 3:30 PM, Ojan Vafai <ojan@chromium.org> wrote:
>> > http://www.w3.org/TR/CSS2/visudet.html#containing-block-details
>> > "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:
>> >
>> > 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.
>> > Otherwise, the containing block is formed by the padding edge of the
>> > ancestor."
>> >
>> > http://dev.w3.org/csswg/css3-sizing/#extrinsic-sizing
>> > "less the box's inline-axis margins, borders, and padding."
>> >
>> > Should the extrinsic size of position:absolute elements include the
>> padding
>> > or not? My feeling is that it shouldn't for the purposes of things
>> like
>> > fill-available and auto-sizing perpendicular writing-modes, but I
>> could
>> be
>> > convinced otherwise.
>>
>> Nothing to change here, luckily - you just misread that section. ^_^
>>
>
> I guess I still find the CSS2.1 language confusing: "the containing block
> is formed by the padding edge of the ancestor." That makes it sound like
> the containing block *is* the imaginary block formed by the padding edge
> of
> the ancestor.

The containing block of an absolutely positioned non-inline element is an
imaginary block formed by the padding edge of the nearest (closest within
containment hierarchy) positioned ancestor.

Containing block is not a CSS box.


> I'm fine with your interpretation of it, but it's still not
> totally clear to me just from reading the spec text.


I have asked [1] to improve such text so that it would be more clear, more
explicit. And I've asked this back in march 2012 because several tests
submitted to CSS 2.1 test suite had confused and confusing text asserts.


[1]:
[CSS21] 10.1 Containing block: when "the ancestor is an inline element":
editorial improvements
Date:   	Jeu 8 mars 2012 1:10
http://lists.w3.org/Archives/Public/www-style/2012Mar/0187.html

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 Wednesday, 10 October 2012 01:23:15 UTC