W3C home > Mailing lists > Public > www-style@w3.org > February 2012

Re: [css3-regions][css3-gcpm] Plan B versus Plan A

From: Alan Stearns <stearns@adobe.com>
Date: Mon, 6 Feb 2012 07:30:36 -0800
To: Håkon Wium Lie <howcome@opera.com>
CC: "www-style@w3.org" <www-style@w3.org>
Message-ID: <CB55B0AC.B1F5%stearns@adobe.com>
On 2/6/12 4:10 PM, "Håkon Wium Lie" <howcome@opera.com> wrote:

> Also sprach Alan Stearns:
>> But the 2em value of font-size isn't present in the unrelated content, so
>> the height calculation of the region can't be make in the unrelated-content
>> block. Is there a way to position the unrelated content using GCPM in this
>> case?
> I'd do this:
>   p.lead::first-lines(3) { float: top } /* float it to top */
>   img { float: top }                    /* float it just under the first three
> lines */
>   <article>
>     <p class=lead>...
>     <img>
>     <p>...    <p>...    <p>...    <p>...    <p>...
>   </article>
> (The placement of the <img> element in the source code is not random
> in this case; it must appear lower afte the <p.lead> element in order
> to float up underneath the first three lines. And the <p.lead> element
> must have enough content to fill three lines, otherwise the image will
> be higher. If the <img> element appears before the <p.lead> element in
> the source code, the image will come out above the content of
> <p.lead>.

So in this solution the img (or whatever the unrelated content happens to
be) needs to be in-flow to get the required position. This breaks my
original requirement to assemble a layout out of unrelated parts. I agree
that multicol and floats are perfectly suitable for laying out in-flow
content. Laying out multiple flows becomes more complex, and I think that
using region primitives in these situations will prove more straightforward.


Received on Monday, 6 February 2012 15:52:56 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:11 UTC