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: Daniel Holbert <dholbert@mozilla.com>
Date: Thu, 31 May 2012 14:42:22 -0700
Message-ID: <4FC7E5BE.8020502@mozilla.com>
To: Alex Mogilevsky <alexmog@microsoft.com>
CC: Sylvain Galineau <sylvaing@microsoft.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, "www-style@w3.org" <www-style@w3.org>
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.

Received on Thursday, 31 May 2012 21:42:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:17 UTC