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

On Thu, May 27, 2010 at 11:27 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
> On May 27, 2010, at 10:39 PM, Zack Weinberg wrote:
>> This is on a different level.  I am saying that calc(10px + 1fl)
>> *reads as if* it cannot be narrower than 10px, and therefore Tab's
>> proposed semantics are confusing. You are saying that sometimes you
>> want it to be narrower than 10px, but to that I say, why not write
>> calc(10px + 1fl - upto(10px)) if that's what you mean?
>
> Because that is a worse and more confusing syntax. It seems like you are just adding notation for no good reason.
>
> 'calc(10px + 1fl)' is not confusing to me at all, because I know that flex can be negative, and that adding a negative number makes something smaller. I don't see anything there that implies that 1fl must be 0 or more. The idea of flexbox is to end up with items that are proportioned the way the author asks, with whatever space is available. So if there is not enough space available without overflowing, then the space to apportion is a negative number, and flex takes away instead of giving. If you wanted to prevent something from going narrower than a certain size, then that is exactly what 'min-width' already exists for.

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.

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.

~TJ

Received on Friday, 28 May 2010 15:53:48 UTC