Re: [css3-regions] regions forming stacking contexts

On Feb 2, 2012, at 4:50 PM, Brad Kemper wrote:

> 
> 
> Sent from my iPad
> 
> On Feb 2, 2012, at 2:55 AM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
> 
>>> From: rocallahan@gmail.com [mailto:rocallahan@gmail.com] On Behalf Of Robert O'Callahan
>>> Sent: Thursday, February 02, 2012 2:12 AM
>>> 
>>> Here's another example of questions arising from the latter. Consider two regions R1 and R2, 
>>> where R1 is position:relative and R2 is position:static, and we flow content into the regions 
>>> containing an element that's position:absolute. How do we determine the abs-pos containing 
>>> block of the element? Is it possible for the element to split into multiple boxes with different 
>>> containing blocks? Could a simple layout change, such adding some text to the DOM before the
>>> abs-pos element, push the abs-pos element from R1 to R2 and thus change its containing block?
>> 
>> Well, I will wholeheartedly agree that separate stacking context per region is a good way to preserve sanity.
>> 
>> Different positioning for regions shouldn't be a problem though. The initial containing block for named flow is the first region. Not sure it is clearly defined now, but it is that way in paged media (first page is the ICB) and it better be same in regions.
> 
> And multi-col?

In multi-col, the initial containing block definition is the default, as far as I can tell (and test). So if we have:

#multicol {
    columns: 3;
    height: 200px;
    position: absolute;
}

and:

<div id="multicol">
	.... 
	<span style="position: absolute; top: 80px; left: 0; height: 100px;
                             width: 100%; background: yellow"></span>
</div>

then the span is positioned relative to the multicol which is the containing block in that case (because it is itself absolutely positioned). Implementations I test (FF, Opera, WK) are consistent for multi-col and absolute positioned descendants.


Vincent

Received on Friday, 3 February 2012 09:11:47 UTC