W3C home > Mailing lists > Public > www-style@w3.org > April 2011

RE: [css3-flexbox] Best way to denote flexible lengths

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Tue, 26 Apr 2011 06:06:54 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>
CC: www-style list <www-style@w3.org>
Message-ID: <D51C9E849DDD0D4EA38C2E539856928411F8032C@TK5EX14MBXC218.redmond.corp.microsoft.com>
OK, I see, you are proposing a general purpose 'box-align', to be part of CSS3 box model, not just flexbox. I like the idea.

So the meaning of box-align is to do what table cells do with 'vertical align', with same values, right? But it is still just about alignment in block direction?

I think it is worth giving it a try. When you say it applies "everywhere" it really means it applies to "display:block|inline-block|table-cell". It should apply to flexbox as well then (because it makes sense there too).

Is that what you are thinking?

On flex(1 auto 0) -- I don't feel very strongly about it. I would feel strongly if we would expect that to ever extend to do more, which is unlikely.


-----Original Message-----
From: Tab Atkins Jr. [mailto:jackalmage@gmail.com] 
Sent: Monday, April 25, 2011 10:28 PM
To: Alex Mogilevsky
Cc: www-style list
Subject: Re: [css3-flexbox] Best way to denote flexible lengths

On Wed, Apr 20, 2011 at 2:21 AM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
>> -----Original Message-----
>> From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
>> Sent: Saturday, April 16, 2011 9:06 AM
>> How do you feel about removing flexible padding, and instead speccing 
>> a 'box-align' property, as was discussed a few years ago?
> Considering that 'box-align' is what I have implemented I would support it. However you previously insisted that older 'box-align' doesn't handle use case you cared about - stretching the boxes while aligning baseline of content. Are you now OK with going back completely to 'box-align:before|after|middle|baseline', with baseline defined as in 2007 spec, or will you want to revisit the align values?

Sorry, I'm referring to something completely different.  A few years ago (I think in 2008), it was proposed that we have a 'box-align'
property that allows for centering behavior the same as what 'vertical-align' does for table cells - that is, it makes the element a BFC, and then aligns the contents of the box.  (Obviously, this only has an effect if the box has an explicit height greater than its

Fantasai has suggested to me that we can utilize this to achieve the "stretched box, align the contents" use-case, which I'm currently solving with flexible padding.  It would also be usable outside of flexbox, in an obviously useful fashion.

If we adopted this, the only change would be that I'd drop the ability of padding to be flexible.  Width, height, and margins would still be flexible.  I'd then define the box-align value, which is usable everywhere.

>> > If flex() can take space separated flexibility and size, and 
>> > flexibility
>> is one or two numbers, then the weird sequence is not allowed.
>> Okay, I'll make the edit on Monday.
> This sounded good last Saturday, did you change your mind (in later mail)?

Yeah, it was easier to spec that the length was allowed to go between the two flexibility values.  Like I said, if you feel strongly that this shouldn't be allowed, I'm definitely willing to change the spec accordingly.


Received on Tuesday, 26 April 2011 06:07:25 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:45 UTC