Re: [css-gcpm] String-set issues

On Mon, Nov 24, 2014 at 1:49 PM, Håkon Wium Lie <howcome@opera.com> wrote:
> Brad Kemper wrote:
>  >  3. 'string-set' only gets the text of the element. I would think
>  >  there are times when it would be useful to get all the content
>  >  nodes, including links, bolds, small pictures, spans with class
>  >  names, etc.
>
> Yes, this is what running elements are for.
>
>    https://books.spec.whatwg.org/#running-elements

Running elements are limited in that they only move elements, rather
than (possibly) copy them. In many cases this would require duplicate
markup.

I've found at least seven proposals for moving document content into
page margin boxes (here with ultra-minimal examples)

A. string-set and string(), which as we've mentioned are implemented
by Prince and AntennaHouse, and have been in GCPM3 forever:

h1 { string-set: foo content() }
@top { content: string(foo) }


B.  Running elements, which have been implemented by Prince (not sure about AH):

h1 { position: running(foo) }
@top { content: element(foo) }


C.  Another syntax proposed by Bert Bos:

h1 { running: foo }
h1:running { /* format copied element independent of original */ }
@top { content: element(foo) }


D.  flow, which has also been implemented by Prince:

h1 { flow: static(foo) }
@top { content: flow(foo) }


E.  Brad Kemper's proposal from this thread:

h1 { copy-into: foo }
@top { content: foo }


F.  GCPM4 proposal using CSS Regions:

h1 { flow-into: foo; flow-policy: persist }
@top { flow-from: foo }

Some of these proposals, like running elements and flow, don't support
copying. I think a minimal set of requirements is

[1] Retain internal structure of element (like italic inside head, or MathML)
[2] Avoid duplicate markup
[3] Provide mechanism for inserting commonly-used non-document
content, like dates and filenames
[4] Allow independent styling of copied content
[5] Provide way of selecting which instance of element is used on a
given page (as first/start/last/first-except tries to do)

Bert has lots of ideas at
http://www.w3.org/Style/2013/paged-media-tasks#running-headers-and-footers-there-are-tw

Thanks,

Dave

Received on Monday, 24 November 2014 20:44:26 UTC