Re: [css3-regions][css3-gcpm] Thoughts on Plan A and Plan B

On 2/26/12 9:45 PM, "Brad Kemper" <brad.kemper@gmail.com> wrote:

> 
> On Feb 24, 2012, at 1:39 PM, Alan Stearns <stearns@adobe.com> wrote:
> 
>> On 2/24/12 9:05 AM, "Brad Kemper" <brad.kemper@gmail.com> wrote:
>> 
>>> '@slot' without any name means "page content region" (with no 'flow-from',
>>> as
>>> it just receives normal, mundane, non-css3-regions flow), and cannot be
>>> styled
>>> directly. Instead, it can contain selectors for styling normal content that
>>> appears on that page. So the example would look like this:
>>> 
>>>  @page fishy {
>>>    @slot(sushi) {
>>>       position: absolute;
>>>       top: 0; bottom: 0;
>>>       right: 0; width: 10em;
>>>    }
>>>    @slot { 
>>>       article {
>>>           margin-right: 11em;
>>>           /* meaning, on this page template,  */
>>>           /* add a right margin to this element */
>>>    }
>>> }
>>> @page { /* default for page 2 */ }
>>> aside { flow-to: sushi }
>>> article { /* no flow-to, so goes to all pages as normal */ }
>>> 
>>> I suppose we might also need a special property for use within @page that
>>> means "don't accept normal flow on this page, and only accept region flow
>>> instead".
>> 
>> In terms of using names to associate content with slots, we already have
>> named flow idents from css3-regions to use. So your slot-content-assignment
>> syntax could change to something like this (I'm adding an element property
>> to associate the article element(s) with one or more paginated templates)
>> 
>> @page fishy {
>>   @slot {
>>     /* positioning */
>>     flow-from: sushi;
>>   }
>>   @slot {
>>     /* positioning */
>>     /* no content or flow-from declaration, so use normal flow */
>>   }
>> }
>> aside { flow-into: sushi; }
>> article { master-template: fishy; }
>> 
>> If a slot has no content assigned to it with the 'content' or 'flow-from'
>> properties, then it defaults to normal flow. You can create a paginated
>> template that does not accept normal flow by making sure that each slot has
>> assigned content.
> 
> I considered that, but it seemed to me that the slots should be named (or at
> least numbered), so that they could be uniquely identified. Then they could be
> cascaded to a certain extent, so that if the same slot was written twice, the
> later one would win, or so that if '@page fishy :first' overrode '@page
> fishy', you would know which slot was which by their name, so that they could
> thus be overridden too.

I expect that we should be able to name slots, but I'm not sure it should be
required. 

> This would also mean that you could only end up with one 'normal flow' slot,
> which I think is a good thing.

That could be a good thing, or we could define multiple 'normal flow' slots
as making up a region chain for the content.

> I also liked the idea that they slot name not only identifies the slot, but at
> the same time identifies it with a flow, so that authors don't end up having
> to think of separate names for each. Some authors might choose the same name
> anyway, and some wouldn't, and that would make the style sheets harder to
> understand, especially for a learner. It does mean that the slot would need to
> ignore the 'flow-from' property in them, and that property would only be used
> for non-paged purposes (which I suspect would be a minority usage of regions).

Using a unique slot name to associate the slot with a named flow isn't
workable. We need to have a way of associating more than one slot with the
same named flow in a single template.

Thanks,

Alan

Received on Monday, 27 February 2012 19:21:08 UTC