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: Fri, 15 Apr 2011 05:57:30 +0000
To: Andrew Fedoniouk <news@terrainformatica.com>, Brad Kemper <brad.kemper@gmail.com>, Tab Atkins Jr. <jackalmage@gmail.com>
CC: www-style list <www-style@w3.org>
Message-ID: <D51C9E849DDD0D4EA38C2E539856928411F2F317@TK5EX14MBXC213.redmond.corp.microsoft.com>
Flexbox spec draft always had negative flexibility. However it was defined same as positive (that is whatever grows faster also shrinks faster) which doesn't make sense usually.

I wouldn't agree that negative flex is less. It is dealing with cases of not enough space, and it is always difficult, so anything that helps create better experience in small space is valuable.

And of course for implementation dealing with negative flexibility is no more difficult than positive - same formulas, different numbers. So why not define it properly?

-----Original Message-----
From: Andrew Fedoniouk [mailto:andrew.fedoniouk@live.com] 
Sent: Thursday, April 14, 2011 8:43 PM
To: Alex Mogilevsky; Brad Kemper; Tab Atkins Jr.
Cc: www-style list
Subject: Re: [css3-flexbox] Best way to denote flexible lengths

"Negative flex" you say?  Interesting. I'd like to try that too ...

Seriously: such simple concept as flex (portion of free space) shall not be that complex. And it isn't.

Can we just focus on simple flex units for now? And postpone this
nightmare(preferred,negative) for CSS4.
If someone will really ask for it?

Andrew Fedoniouk


-----Original Message-----
From: Alex Mogilevsky
Sent: Thursday, April 14, 2011 12:25 AM
To: Brad Kemper ; Tab Atkins Jr.
Cc: www-style list
Subject: RE: [css3-flexbox] Best way to denote flexible lengths

Elsewhere I believe the order is not important if it is not ambiguous. Since we have to numbers they have to be in order - positive flex then negative flex if we want reasonable default.

Having good defaults is key here (just as it is with 'background' property)

flex(1) means (preferred=auto, positive-flex=1, negative-flex=0)
flex(auto) means (preferred=auto, positive-flex=1, negative-flex=0)
flex(0) means (preferred=auto, no flexibility)

if this is really the way to go, it should probably accept unitless zero length at certain priority (first or last... I think last)

-----Original Message-----
From: Brad Kemper [mailto:brad.kemper@gmail.com]
Sent: Wednesday, April 13, 2011 11:15 PM
To: Tab Atkins Jr.
Cc: Alex Mogilevsky; www-style list
Subject: Re: [css3-flexbox] Best way to denote flexible lengths

On Apr 13, 2011, at 5:29 PM, Tab Atkins Jr. wrote:

> On Wed, Apr 13, 2011 at 5:22 PM, Alex Mogilevsky 
> <alexmog@microsoft.com>
> wrote:
>> I don't like the idea of width/height taking space-separated lists. I 
>> would rather have a flex function.
>> Given a choice between flex(1,0,auto) with commas and fixed set of 
>> arguments and flex(auto 1 0) with space separated arbitrary order, I 
>> think I would clearly prefer any-order version...
> Okay, then I'll change the draft to accept the 'fr' unit and the 
> 'flex()' function with space-separated any-order arguments.  Sound 
> good?

I'm confused. 'flex(auto 1 0)' is the same as 'flex(auto 0 1)' or 'flex(1 auto 0)'?
Received on Friday, 15 April 2011 05:57:59 UTC

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