W3C home > Mailing lists > Public > www-style@w3.org > November 2014

Re: [css-gcpm] String-set issues

From: Dave Cramer <dauwhe@gmail.com>
Date: Mon, 24 Nov 2014 15:43:58 -0500
Message-ID: <CADxXqOw-or9dMRNVuN6ezCEaaZLeVxhNNf124j3SB-a00PO8RA@mail.gmail.com>
To: Håkon Wium Lie <howcome@opera.com>
Cc: Brad Kemper <brad.kemper@gmail.com>, www-style list <www-style@w3.org>, Dave Cramer <Dave.Cramer@hbgusa.com>
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

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


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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:49 UTC