Re: [CSS21] Clipping abspos elements

Germain Garand wrote:
> Le dimanche 1 mars 2009, Anton Prowse a écrit :
>> fantasai wrote:
>>> David Hyatt wrote:
>>>  > On Feb 10, 2009, at 2:07 PM, fantasai wrote:
>>>  >> I got a question about this bit of text in 11.1
>>>  >> <http://www.w3.org/TR/CSS21/visufx.html>:
>>>  >>
>>>  >>  # In certain cases, a box may overflow, meaning its content lies
>>>  >>  # partly or entirely outside of the box, e.g.:
>>>  >>  # ...
>>>  >>  # A descendent box is positioned absolutely, partly outside the box.
>>>  >>  # Such boxes are not always clipped by the overflow property on
>>>  >>  # their ancestors.
>>>  >>
>>>  >> Can't figure out what that "Such boxes are not always clipped"
>>>  >> sentence is talking about. An implementor was wondering if it meant
>>>  >> abspos descendents are /not/ supposed to be clipped by "overflow:
>>>  >> hidden". I'm quite sure that's not the case, so, perhaps we could
>>>  >> either clarify what is meant or remove the sentence.
>>>  >
>>>  > overflow clipping follows the containing block hierarchy.  An
>>>  > unpositioned element with overflow:hidden that has an absolutely
>>>  > positioned child will not clip that child.  However a relative
>>>  > positioned element with overflow:hidden that has an absolutely
>>>  > positioned child would clip that child, since it is the containing
>>>  > block for the child.
>>>
>>> Ok, that's what I thought it was talking about.
>>>
>>> I think, given the intent of the section and what it says about
>>> other things... that that sentence should be removed.
>> In that case, can we change "positioned absolutely" to just
>> "positioned", else it looks as if relative positioning is deliberately
>> omitted.
> 
> but the "positioned absolutely" is about the descendent box, so the current 
> sentence is correct. Relative positioning (on the ancestor) only matters if 
> it makes the ancestor chain and the containing block chain coincide, which is 
> not necessary.
> e.g. if the absolutely positioned child is a position:fixed child, then it 
> wouldn't matter if the ancestor is relatively positioned as it still wouldn't 
> be part of the CB chain.

You misunderstand me.  My "in that case" referred to fantasai's
suggestion that the second sentence be removed.  If it is removed, the 
list of causes of overflow contains:

   # * A descendent box is positioned absolutely, partly outside the box.

and yet a relatively positioned descendant box, partly outside the box, 
is equally a cause of overflow.  (Irrelevant but noteworthy: unlike an 
absolutely positioned descendants, but like static descendants, its 
containing block cannot be higher up the chain than the overflow box and 
so it will /always/ be clipped.)

Cheers,
Anton Prowse
http://dev.moonhenge.net

Received on Sunday, 1 March 2009 18:38:45 UTC