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

On Feb 23, 2012, at 3:14 PM, Brad Kemper wrote:

>>>> Perhaps like this?:
>>>> 
>>>> @page 1, 3 {
>>>> @slot sushi {
>>>>    position: absolute;
>>>>    top: 0;
>>>>    bottom: 0;
>>>>    right: 0;
>>>>    width: 10em;
>>>> }
>>>> }
>>>> 
>>>> aside { flowto: sushi }
>>> 
>>> Yeah or you create a named page master with the slot rules and then
>>> somehow identify pages 1 and 3 as pointing to that template.
>> 
>> Perhaps:
>> 
>>  @page fishy {
>>     @slot sushi; 
>>        position: absolute;
>>        top: 0; bottom: 0;
>>        right: 0; width: 10em;
>>     }
>>  }
>>  @page meaty { ... }
>> 
>>  article { page: fishy meaty fishy }
>>  aside { flowto: sushi }
> 
> Or this:
> 
>  @page fishy {
>     @slot(sushi) {
>        position: absolute;
>        top: 0; bottom: 0;
>        right: 0; width: 10em;
>     }
>     @slot() article { margin-right: 11em; }
>  }
>  @page { ... }
>  aside { flowto: sushi }
> 
> The article would flow into the unnamed page normally. The fishy page has an unnamed slot, so the article would also flow into that. '@slot() article' selects that article in that general use slot, with declarations giving it some margin to make room for the sushi sidebar. 

Actually, I was thinking about this, and you wouldn't need to write a selector for article within the slot, only within the @page, as it wouldn't be in any other slot anyway. So revised code would look like this:

 @page fishy {
    @slot(sushi) {
       position: absolute;
       top: 0; bottom: 0;
       right: 0; width: 10em;
    }
    article { margin-right: 11em; }
 }
 @page { ... }
 aside { flowto: sushi }

However, this then creates a problem with having selectors at the same semantic level as raw declarations (which I was recently informed of being in CSS2.1 already). So, my revised revised proposal is this:

'@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".

Received on Friday, 24 February 2012 17:05:45 UTC