Re: Publishing the flexible box model

On Sat, Jun 7, 2008 at 7:41 AM, fantasai <fantasai.lists@inkedblade.net>
wrote:

> I expect you'd keep two values for the margin: the fixed length, and the
> flex value. Collapsing two margins calc(2* + 100px) and calc(1* + 150px)
> would give you a collapsed margin of calc(2* + 150px). The 150px is always
> applied, and the flex value absorbs its quota of additional space when the
> available space is distributed.
>

It's more complicated than that because of the rules for negative margin
collapsing. You'll actually need at least three values, the min-negative,
the max-positive, and the flex.

There will also be interesting interactions between flex-units and
clearance.
<div style="overflow:auto;" class="block-formatting-context">
  <div style="height:1*;">Hello</div>
  <div style="float:left;">Kitty</div>
  <div style="clear:left;">Kitty</div>
</div>
Since we don't know the vertical positions until the end, we can't know
whether to clear or not. If we treat 1* as auto while we compute clearance,
the results are going to be really bad when we apply flex at the end.

I'm not saying these difficulties are insurmountable. But I hope it's clear
that integrating flex-units into the existing CSS layout specs would create
many issues that have to be analyzed and specified. It's not good enough
just to wave our hands and say it's all obvious; the issues raised already
are not obvious and we've only just scratched the surface.

(It's great that Andrew has an implementation, but it's often easier to
implement a feature and say that whatever the implementation does is the
desired behaviour, than it is to write a real spec with all the interactions
worked out.)

So, we need a spec proposal that carefully considers all the possible
interactions between flex-units and CSS layout where flex-units can be used,
and describes how issues (such as the ones already raised) are resolved.

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]

Received on Friday, 6 June 2008 20:44:38 UTC