Re: [css-writing-modes] Margin Collapsing Orthogonal Flows

On 12/21/2014 11:38 AM, Shinyu Murakami wrote:
> fantasai <fantasai.lists@inkedblade.net> wrote on 2014/12/20 9:32:11
>> Gérard has been testing Writing Modes and found an interesting
>> discrepency between Webkit/Blink and Gecko:
>>
>> <horizontal-tb>
>>     <vertical-lr>
>>       <p>I have margins</p>
>>     </vertical-lr>
>> </horizontal-tb>
>>
>> In Firefox, the left and right margins of the <p> collapse out
>> through the content edge of <vertical-lr>.
>>
>> In Webkit, they are contained by <vertical-lr>'s content box.
>>
>> I am wondering what is the preferred behavior in such a case:
>> should these margins collapse?
>
> No, there is no reason to collapse the margins out inside the orthogonal flows.
> The result of firefox seems wrong.

Thinking about this again, I think you are are right. <vertical-lr>
is a BFC root, therefore it is not allowed to collapse its margins
with it's child's margins.

(The reason to allow this would be the same as for any other block:
if you want X spacing around your paragraphs and Y spacing around
your section, you usually want either Y or max(X,Y) spacing when
you nest them: X+Y spacing would be too much.)

I'm going to close this issue as no change to the spec, because
orthogonal flows creates a BFC root, which implies no margin
collapsing.

~fantasai

Received on Wednesday, 26 August 2015 00:48:23 UTC