W3C home > Mailing lists > Public > www-style@w3.org > May 2010

RE: Fw: RE: [css-flexbox] Summary of planned changes to Flexbox Module

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Wed, 12 May 2010 00:08:29 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>, "robert@ocallahan.org" <robert@ocallahan.org>
CC: Adam Del Vecchio <adam.delvecchio@go-techo.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <5258A1A783764C478A36E2BC4A9C497E06B519@tk5ex14mbxc105.redmond.corp.microsoft.com>
I have not noticed the warning of margins collapsing in the new draft. Please say it was accidentally copied from elsewhere and you didn't really mean it.

-----Original Message-----
From: Tab Atkins Jr. [mailto:jackalmage@gmail.com] 
Sent: Tuesday, May 11, 2010 5:00 PM
To: robert@ocallahan.org
Cc: Alex Mogilevsky; Adam Del Vecchio; www-style@w3.org
Subject: Re: Fw: RE: [css-flexbox] Summary of planned changes to Flexbox Module

On Tue, May 11, 2010 at 2:47 PM, Robert O'Callahan <robert@ocallahan.org> wrote:
> On Wed, May 12, 2010 at 9:45 AM, Robert O'Callahan 
> <robert@ocallahan.org>
> wrote:
>>
>> On Wed, May 12, 2010 at 8:55 AM, Tab Atkins Jr. 
>> <jackalmage@gmail.com>
>> wrote:
>>>
>>> box { display: flexbox; }
>>> box > * { margin: 0 1fl; } /* Margins will collapse in the new draft 
>>> */
>>
>>
>> Yikes. Collapsing margins containing flexes sounds ... hard.
>
>
> Well, it's not hard if margins can only be a fixed length or a flex, 
> but not both. If you allow additive flex in margins, collapsing them 
> will be very hard.

Not necessarily.  Say two adjacent margins are calc(20px+1fl) and calc(10px+2fl).  I think we could get away with collapsing their pieces separately, so it's equivalent to a single margin with calc(20px+2fl).

This isn't the only possible way to do this, but it's a simple way to handle it that I think will typically do what you want.

~TJ

Received on Wednesday, 12 May 2010 00:09:02 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:27 GMT