Re: [css3-page] Styling elements differently based on whether they appear on a left or right page

On Jul 28, 2013, at 5:06 PM, Håkon Wium Lie <howcome@opera.com> wrote:

> Also sprach Brad Kemper:
> 
>>> http://people.opera.com/howcome/2013/02-reader/
>>> 
>>> What would be your preferred ways of coding, say, the first of these?
>> 
>> I've nothing against doing that sort of layout like that, where you
>> have evenly sized and spaced columns and everything is to fit
>> within even multiples of those columns.
> 
> That's good. Still, my question stands: how would you code these sorts
> of layouts using your preferred methods -- what would the code look like in
> flex box or grid? 

You're solving a different problem than the one of common use sidebars. For what you are doing with moving some figures, headlines, and leads around in an article, and having them span columns, I think your solution would work great, and I don't think I would prefer to try do it in flex box or grid. But that is very different from the non-trivial travails of trying to use floats for sidebars in flexible layouts that might have one or two sidebars, zero or one footers (that may or may not need to span all 2-3 layout "columns"), and possibly no wrapper elements other than BODY and HTML tags. For those kind of layout needs, grid and flexbox are much more suitable than floats, and much less hacky.

And float:inside/outside still does not solve other needs, some of which I've listed, for modifying styling based on what page an element is on, including named pages.

Received on Monday, 29 July 2013 06:09:56 UTC