RE: thoughts on page templates

In preparation to paged layout discussions next week, I am going over related threads...

The email at start of this thread is now a wiki page http://wiki.csswg.org/spec/css3-region-templates 

>From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
>Sent: Wednesday, November 09, 2011 3:27 PM
>
>On Sat, Nov 5, 2011 at 10:42 AM, Alex Mogilevsky <alexmog@microsoft.com>
>wrote:
>> 1.       Element-per-region
>>
>> Peter’s template design [1] relies on region functionality where a
>> region consumes exactly one element from flow. This is close to what
>> would have happen if there was a forced break after each element, but
>> region auto sizing doesn’t work that way now.
>
>I've looked over the document, but I'm not sure I understand why this
>functionality is required.  Can you give an example?

A pre-designed template ('template' can be taken in broad sense here -- think about what a graphic designer sketches on paper and gives to a web developer) uses placeholders of two kind:

 -- slots to put specific content and images (title, abstract, logo, illustration)
 -- chained boxes to fill with text flow

The latter is what regions currently are. The former was part of original regions proposal, but it didn’t get a lot of attention and is not in the spec now.

The "placeholder for one item" kind of region is probably not high priority because it has easy workaround in script. But for a fully functional static templates it is essential.

>>      region-type: page | column | box | slot | frame | auto
>>      (initial: auto)
>
>'box' and 'slot' should not be distinct values.  This should instead be
>controlled through a property on the region container itself that removes
>it from the box tree while keeping its children in.

What would that property look like? Whatever makes region removed from box tree needs to be on the region itself, how else could it work?

BTW, actually 'box', 'slot' and 'frame' could be one property... but then something else controls how much content to take and be in box tree or not.

>> 1.1. ‘flow-into’: element vs. content
>>
>> The issue of nested containers in regions (“region-type:box” vs.
>> “region-type:slot”) can also be addressed by named flow source element
>> sending its content to the flow, e.g. like this:
>
>I like the idea of having a display value that takes the element out of the
>box tree but leaves its children.  This was previous suggested by me (and
>maybe others? I forget now) as "display: transparent".

Interesting. "display:noblock" maybe? That would solve box/slot difference too. 

>>      <iframe style=”display:content”> -- similar to “seamless” iframe,
>> but not transparent for dom and styles.
>
>These don't work - iframes have no children as far as CSS is concerned.  If
>they do, this would show their DOM children, not the referenced page.

Well, if we have power to remove element from box tree and replace it with its children, why not replace it with generated content or content from completely difference source? Doing that in a generic way may be technically complicated, but as a concept I don't see why not...

>> Effect on replaced elements is undefined, but at least should reset
>> any non-default properties.
>
>I don't understand what this means.

I meant that <img style="border:medium solid red; display:content"> would probably display the image but not the border. 

But that is too much detail at this level...

>> 2.       Template from named flow
>
>Could you provide an example of what you're trying to accomplish with this?

I'll add a complete example to wiki. Issue for now.

>
>
>> 3.       Page view with generated pages
>>
>> 3.1. GC option – pages as generated content
>[snip]
>> 3.2. Script option – pages in DOM
>[snip]
>
>I don't understand what any of this is supposed to do.  ;_;  Can you give a
>more detailed explanation?  Are you using the word "pages" to refer to
>something other than the auto-generated things that happen when you used
>paged media?

I put together a wiki page with examples of different cases that are considered "pages" in different contexts. I hope it will help agree on what a "page" is...
http://wiki.csswg.org/spec/page-view 

That example you asked about showed simplified structure of a custom page viewer. The example is probably misplaced.

>> 6.       Wiki?
>I definitely suggest doing this, so things can be expanded and refined in-
>place.  ^_^

done

Received on Wednesday, 1 February 2012 18:54:59 UTC