Re: [css-regions] responsive and semantic use of named flows

On 1/26/14, 9:38 AM, "Håkon Wium Lie" <howcome@opera.com> wrote:

>Alan Stearns wrote:
>
> > The way you do this is with this CSS:
> > 
> > article {
> >   flow-into: combined-article-flow content;
> > }
> > article:nth-of-type(1) {
> >   flow-from: combined-article-flow;
> >   max-height: 100vh;
> > }
> > article:nth-of-type(2) {
> >   flow-from: combined-article-flow;
> > }
>
> > All of the presentation is in the CSS,
> > and you don't even have to add class attributes to the markup.
>
>It true that you don't use any dummy <div> elements in your example.
>That's good. But you still abuse elements, namely the first and second
><article> elements. They are changed from being a structural elements
>which marks the start and end of articles, into presentational
>elements which hold some article content (and whatever else is flowed
>into them).

I think that’s debatable. Instead of boxes for each article element that
contain article content, you have region boxes created from the article
elements that contain article contents from a named flow. In this case,
there is no ‘whatever else’. The article boxes have article content.

>
>Also, the solution doesn't scale. If you need more regions than you
>have articles (the WebPlatform article [1] uses at least 6 regions),
>you would need to add dummy elements somehow.

This example only needs two boxes, and scales to any number of articles
greater than 2. I agree that in a more complex example there could be more
boxes needed.

Thanks,

Alan

Received on Sunday, 26 January 2014 18:46:38 UTC