- From: Brad Kemper <brad.kemper@gmail.com>
- Date: Sun, 26 Feb 2012 21:45:19 -0800
- To: Alan Stearns <stearns@adobe.com>
- Cc: HÃ¥kon Wium Lie <howcome@opera.com>, David Hyatt <hyatt@apple.com>, "www-style@w3.org Style" <www-style@w3.org>
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. This would also mean that you could only end up with one 'normal flow' slot, which I think is a good thing. 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).
Received on Monday, 27 February 2012 05:45:55 UTC