Re: Publishing the flexible box model

On Sat, Jun 7, 2008 at 10:49 AM, Andrew Fedoniouk <news@terrainformatica.com>
wrote:

> Robert O'Callahan wrote:

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.
>>
> As I said floats are not the best friends of flexes. But if flexes and the
> flow attribute will be implemented you will see a dramatic reduction of
> floats uses.
> All cases when floats are used currently for horizontal block layout
> purposes can be implemented significantly better and more reliable with
> flexes.


Many of them can use inline-block as well actually.

Unfortunately floats are a reality and you need to specify something that
makes sense for how floats and flex-units and clearance interact, because
even if authors shouldn't use them together, they definitely will.


>
>> 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.
>>
> Opportunities that flexes provide outweigh possible issues significantly. I
> wish flexes were in CSS from the very beginning.
> That would simplify spec significantly (in particular all about floats).
> And yet it will make obsolete that holy-wars about tables
> used for layout purposes. Flexes give even more than you can do with html
> tables.


You may be right, but we have to deal with the way things are.

By the way, what happens when flex-units occur in contexts like tables and
relative and absolute positioning?


>  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.
>>
>>  I agree. The problem is that I am personally is not that good in writing
> specs. If someone will help me than we can come up with something.
> In principle it not going to be very complex definition.


I am not as optimistic as you.

Adding flex-units support seems to me to be a very invasive change that will
affect large chunks of the CSS spec and many parts of existing layout
engines. I think the flexbox spec, or something like it, will be much easier
and lower risk, and therefore much more likely to be successful. I think we
should continue working on it and not wait for flex-units to be worked out.

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 Saturday, 7 June 2008 09:31:19 UTC