W3C home > Mailing lists > Public > www-style@w3.org > December 2013

[css-regions] content/presentation separation, and regions as elements

From: Alan Stearns <stearns@adobe.com>
Date: Fri, 20 Dec 2013 01:13:42 +0000
To: www-style list <www-style@w3.org>
Message-ID: <CED8D9C3.353D9%stearns@adobe.com>
Fantasai and I had a short conversation last week about CSS Regions and
elements, which I found very useful. So I'd like to capture what I recall
here, and expand a bit on what we talked about. I'm hoping that I express
her position correctly - please correct this if I get anything wrong.

She expressed reservations about having a single HTML file that contains
both content and presentational markup. I can sympathize with that
position, but I think that describes current web reality. Server-side
mechanisms combine content with a template, and the browser is served a
single file containing content and presentational markup all mixed
together.

I think there are some situations where using flow-into and flow-from can
introduce more separation from content and presentation than is seen in
current practice. Having separate content and template sections in your
HTML file instead of mixing everything together can sometimes make the
structure for both sections more clear. But this isn't good enough, in
Fantasai's estimation.

So I wanted to note how you can use named flows to combine content and
presentation from entirely separate files. I believe Fantasai preferred
this approach. Combining files is a key feature of IE's current
implementation, and one reason we added the content keyword to the
specification.

The way you create a named flow in IE10 and IE11 is to import a content
document into an iframe in a template document. The named flow is created
from the iframe's contents, and flows into the elements described in the
template. In the current draft, this can be done by using flow-into on an
iframe with the 'content' keyword. This use of the keyword is meant to
match IE's current implementation, but without the restriction that it
only works on iframes.

You should also be able to keep the presentational markup separate using
HTML Templates, which was one of the motivations for recasting the CSS
Regions examples using that mechanism. This turned out to be a bit
premature, so I've switched the examples back. But I think it's promising
that it was easy to translate the examples to use the HTML Templates
proposal.

I also brought up the issue of flow-from applying to elements. One thread
of feedback we've recieved is that flow-from should only apply to
pseudo-elements (or other CSS-generated boxes). This has never made much
sense to me. As far as I know, content is the only property that is
currently restricted to pseudo-elements, and we're looking to extend its
use to elements. I believe Fantasai agreed with me that restricting a new
property to pseudo-elements would be a bad choice.

Thanks,

Alan

Received on Friday, 20 December 2013 01:14:13 UTC

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