Re: Question on collapsing margins and block reflow context roots

Everything Ian described is what Safari (WebCore) does for <button> and 
<fieldset> (and for overflow non-visible elements).

dave

Ian Hickson wrote:

>On Wed, 26 Jan 2005, Boris Zbarsky wrote:
>  
>
>>So my questions are:
>>
>>1)  Do the margins of boxes with non-visible overflow set collapse with their
>>    siblings?
>>    
>>
>
>Yes. They are still in-flow elements. The block formatting context root is 
>just inside the element, as it were. (The difference with floated 
>elements, positioned elements, and root elements is that these three are 
>not in flow.)
>
>
>  
>
>>The reason I ask is that there may be some "replaced elements" (I put 
>>that in quotes because they aren't quite) that effectively act like 
>>block reflow context roots in some UAs (HTML's <button> and <fieldset> 
>>come to mind), and it would be good to have a guideline as to how margin 
>>collapsing should work for those elements.
>>    
>>
>
>IMHO the default rendering of <button> should be 'inline-block' and the 
>default rendering of <fieldset> should be 'block', with the <legend> 
>positioned over the border edge either via positioning or via extra-CSS 
>means. But I acknowledge that this is not normatively defined anywhere.
>
>  
>

Received on Thursday, 27 January 2005 20:35:28 UTC