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

RE: [css3-flexbox] flex-shrink defines a negative flex ratio; negative numbers are invalid

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Thu, 31 May 2012 22:21:48 +0000
To: Daniel Holbert <dholbert@mozilla.com>
CC: Sylvain Galineau <sylvaing@microsoft.com>, Tab Atkins Jr. <jackalmage@gmail.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <2C86A15F63CD734EB1D846A0BA4E0FC823CA0110@CH1PRD0310MB381.namprd03.prod.outlook.com>
± From: Daniel Holbert [mailto:dholbert@mozilla.com] 
± Sent: Thursday, May 31, 2012 2:42 PM
± 
± On 05/31/2012 02:18 PM, Alex Mogilevsky wrote:
± > It would make "flex:1 -1 100px" look cool and we certainly can do
± that. It would however create the first ever precedent of a property taking 
± negative values only. And its meaning is not really "negative", it is ability 
± to shrink...
± >
± > Maybe we should just use a different word in the spec?
± 
± Perhaps just:
±   s/positive flex ratio/flex grow ratio/
±   s/negative flex ratio/flex shrink ratio/ with appropriate massaging of 
± contextual text?
± (e.g. "If the sign of the free space matches the sign of the flexibility" 
± would perhaps get s/matches the sign/matches the type/.)
± 
± I don't think there's any reason for the spec to talk about these as 
± "positive" vs. "negative" ratios anymore, especially now that they have their 
± own properties that use the "grow"/"shrink" terminology.
± 
± Any signed-ness really comes from the amount of free space, and then we 
± select the grow or the shrink ratio based on that sign.  The ratio itself is 
± always nonnegative (and could always be 0 -- neither negative nor positive), 
± and calling it a "negative ratio" vs. "positive ratio"
± confuses that fact.

+1



Received on Thursday, 31 May 2012 22:23:26 GMT

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