- From: Brad Kemper <brad.kemper@gmail.com>
- Date: Thu, 26 Sep 2013 09:09:39 -0700
- To: Håkon Wium Lie <howcome@opera.com>
- Cc: "Cramer, Dave" <Dave.Cramer@hbgusa.com>, "www-style@w3.org" <www-style@w3.org>
> On Sep 25, 2013, at 11:58 AM, Håkon Wium Lie <howcome@opera.com> wrote:
>
> Hello Dave,
>
>> We often put chapter titles in running heads. Sometimes that title
>> may contain an italic word ("The Sinking of the Lusitania"). If we
>> use named strings for the running head, we lose the italic. If we
>> use running elements, we'd need to add a second copy of the chapter
>> title to the HTML, purely for the running head.
>>
>> A third option would be useful to us—in addition to copying the
>> content (string) and moving the element(running element), I'd like
>> to be able to copy the element to a margin box.
>
> Yes. This was part of GCPM ED until June, when I pruned features that
> had not been implemented. Here's a copy of th Jun 27 draft:
>
> http://people.opera.com/howcome/2013/gcpm/06-27.html
>
> where one of the examples are:
>
> In this example, the element is copied into the running header but
> it also keeps its normal place.
>
> title { position: running(header), normal }
> @page { @top-center {
> content: element(header) }
> }
>
> I'm happy to resurrect the feature, though -- it's very useful.
> Changing 'position' to take a comma-separated list is a big deal and
> there may be better ways to achieve the same.
It feels kind of strange to me to be using the 'position' property to get running headers. I think it would be more natural to extend the properties used for regions, which already do a lot of similar things. So, for instance, if the element is to be moved, not copied, then something like this:
title { flow-into: header running }
@page { @top-center {
flow-from: header;
}
}
Thus the "running" keyword would mean that the flow repeats on each page (like a header or footer) instead of flowing from page to page (like footnotes might), and that anything else with 'flow-into: header' (with or without the "running" keyword) would replace the existing 'header' flow. You could also add your 'element()' second arguments to 'flow-from', like this:
flow-from: header first-except;
Those second arguments could be useful even if it wasn't a running flow.
Then, for Dave's use case, where the element is to be copied, not moved, we'd use a 'running-copy' keyword, instead of just 'running':
title { flow-into: header running-copy }
This to me feels right. It leverages what people would already know about flow-into and flow-from, styling with @region or ::region(), etc.
I'd like to use '::before' on the margin boxes, to pick up some of the string content ideas (note that the regions draft already allows the 'content' keyword in the 'flow-into' value):
title {
flow-into: HEADER content running;
counter-increment: header;
}
@page { @top-center {
flow-from: HEADER;
}
@top-center::before {
content: "Chapter " counter(header) ": ";
}
}
This feels simpler and easier, and more consistent with region syntax, than the current or past gcpm equivalents.
Received on Thursday, 26 September 2013 16:10:12 UTC