W3C home > Mailing lists > Public > www-style@w3.org > September 2015

Re: [css-break][css-floats] Float pushed to the next fragmentainer, what about its siblings?

From: Morten Stenshorne <mstensho@opera.com>
Date: Thu, 17 Sep 2015 12:58:30 +0200
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style@w3.org
Message-ID: <8737ydcnxl.fsf@aeneas.oslo.osa>
fantasai <fantasai.lists@inkedblade.net> writes:

> On 09/01/2015 08:51 AM, Morten Stenshorne wrote:
>> When a float is pushed to the next fragmentainer (let's use multicol as
>> an example, so henceforth I'll use the term "column" instead of
>> "fragmentainer"), because it's unbreakable, and there's not enough space
>> remaining in the current column, should consecutive content also be
>> pushed to the next column, even if there's room for it in the previous
>> column?
>>
>> Example:
>>
>>      <div style="columns:2; column-fill:auto; height:10em; orphans:1; widows:1;">
>>          line before float<br>
>>          <img src="http://home.powertech.no/mstensho/gfx/bilen.jpg" style="float:left; height:10em;">
>>          line after float, but in which column?<br>
>>      </div>
>>
>> Looks like I've been assuming that the answer is "yes, push everything
>> to the next column", seeing how I implemented it in Presto, but I cannot
>> find anything in the spec suggesting such behavior.
>>
>> And I have a feeling that floats traditionally don't affect sibling
>> content in such ways; e.g.:
>
> Another example, that's closer to what happens:
>
> http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cstyle%3E%0A.float%20{%20float%3A%20left%3B%20width%3A%204em%3B%20height%3A%204em%3B%20border%3A%20solid%3B%20}%0A.clear%20{%20clear%3A%20both%3B%20}%0A%3C%2Fstyle%3E%0A%0A%3Cp%3EFirst%20bit%20of%20text.%20Now%20a%20float%3A%20%3Cspan%20class%3D%27float%27%3E1%3C%2Fspan%3E%20Now%20more%20text.%20Now%20another%20float%3A%20%3Cspan%20class%3D%27float%27%3E2%3C%2Fspan%3E%20Now%20a%20third%20float%20that%20also%20has%20clearance%3A%20%3Cspan%20class%3D%27float%20clear%27%3E3%3C%2Fspan%3E%20And%20here%20is%20the%20text%20after%20the%20cleared%20float.
>
> Here we have a float in the middle of the text that is cleared.
> It goes below the previous floats, but it doesn't push the
> content after the float down to come with it.
>
> So I think my conclusion is, no, the float may move, but it
> does not take its content with it.

Good, thanks for responding. Could you word this into the spec if
everyone agrees, then?

-- 
---- Morten Stenshorne, developer, Opera Software ASA ----
------------------ http://www.opera.com/ -----------------
Received on Thursday, 17 September 2015 10:59:06 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:33 UTC