- From: Andrew Fedoniouk <andrew.fedoniouk@live.com>
- Date: Thu, 14 Apr 2011 22:46:17 -0700
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: "Alex Mogilevsky" <alexmog@microsoft.com>, "www-style list" <www-style@w3.org>
>-----Original Message-----
>From: Tab Atkins Jr.
>Sent: Thursday, April 14, 2011 10:04 AM
>To: Andrew Fedoniouk
>Cc: Andrew Fedoniouk ; Alex Mogilevsky ; www-style list
>Subject: Re: [css3-flexbox] multiline
>
>On Wed, Apr 13, 2011 at 7:44 PM, Andrew Fedoniouk
><andrew.fedoniouk@live.com> wrote:
>> Gentlemen, do you considering case like this:
>>
>> <p>Some text <input style="size:*"> and more.</p >
>>
>> Where the "size:*" is width/height:1fr | 1fl | etc.
>>
>> In this case the <input> is expanded inside the line box and so
>> it will take all available width that is left inside line box after text
>> replacement and its height will be set to fill line box height in full.
>
>Yes, though it involves making the <p> a flexbox. The <input> is then
>a flexbox item, and the texts preceding and following it are wrapped
>in anonymous flexbox items (which don't have any flexibility), so the
><input> expands to take up any available space in the <p>.
>
>This doesn't interact with inline layout, though, as you seem to be
>implying.
Flex computation inside line boxes happens exactly at the time
of text-align:justify computation as it is conceptually the same thing.
I am using the following [pseudocode]:
function text_block::layout_width()
{
...
foreach(line) {
if( line.has_horizontal_flexes )
free_space = compute_flexes_in(line, free_space );
if( free_space > 0 && text_align == justify )
compute_flex_whitespaces_in(line, free_space);
}
Technically this is close to the case when <input> has width defined
in percents. I do not see why you need to wrap anything here into
anonymous flexbox items. (Or I do not understand your idea)
Vertical flexes inside line box are computed at the moment of vertical
alignment computation of elements inside line box.
>
>
>> This multiline idea you are discussing... is it conceptually different
>> from the above? If no then probably it is better to just allow flex units
>> inside line boxes, no?
>
>No, it's not quite the same thing. Flexbox layout is a new layout
>mode that does not directly interact with inline layout.
I honestly do not understand what is so special about flexes here.
See: we have line box and so we can flex elements inside it.
Even when there are floats around - you start flex computations
on already calculated line box (with left/right floats shrank its width).
So this:
<p text-align:justify>one two three</p>
is exactly the same as this:
<p >one<span width:*> </span>two<span width:*> </span>three</p>
right?
Quod erat demonstrandum.
>
>
>> What you are going to used for 'row breaks'?
>
>Not entirely sure yet. I, in an earlier personal draft, proposed
>using the break-before/after properties.
>
'personal draft' of someone from IE team? As far as I understand
multi-rows are proposed and implemented already in IE10.
But without row breaks. So asking.
I suggest to use 'clear' for that. 'clear' breaks float rows and
so it can be used for exactly the same purposes in flexboxes
(that cannot contain floats directly anyway).
--
Andrew Fedoniouk
http://terrainformatica.com
Received on Friday, 15 April 2011 05:46:47 UTC