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

Re: [flex-units] unit abbreviations and the flex()

From: by way of Zack Weinberg <zweinberg@mozilla.com>
Date: Fri, 28 May 2010 09:41:09 -0700
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Message-ID: <20100528094109.4b6be662@moxana.local>
"Tab Atkins Jr." <jackalmage@gmail.com> wrote:
> I'm not sure, because I haven't read into it deeply, but based on the
> examples Zack has given and the apparent shape of his understanding, I
> suspect that the either the way the fil unit or the "plus" operator
> works in TeX prevents it from ever representing a negative value.  If
> you see "plus 1fil", you know that it will *only* increase the value,
> never decrease, while "minus 1fil" only decreases, never increases.

Yes, exactly.  (There are complications, but let's not borrow even
more trouble.)

> Coming from a world with those sorts of assumptions, it makes sense to
> me as to why Zack's somewhat unhappy with calc(10px + 1fl).  I don't
> think that's necessarily a reason to cater to those assumptions, but I
> understand them.  ^_^  I suspect that most people would be reasonably
> comfortable with how I'm saying it should work, though.

Well, I think your own example of using max() to set a minimum width
and min() to set a maximum width is a nice demonstration of why this
two-way stretch semantic is confusing even if you don't have a bunch
of ingrained assumptions from TeX.  One-way stretch is just going to
be easier to explain to people coming at this new.

What did you think of calc(min ... pref ... max) ?

Received on Friday, 28 May 2010 16:42:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:46 UTC