W3C home > Mailing lists > Public > www-style@w3.org > December 2005

Re: Printing a Book with CSS

From: Håkon Wium Lie <howcome@opera.com>
Date: Thu, 1 Dec 2005 13:54:27 +0100
Message-ID: <17294.62083.474321.907780@localhost.localdomain>
To: "Mark Schenk" <css@markschenk.com>
Cc: "Lachlan Hunt" <lachlan.hunt@lachy.id.au>, www-style@w3.org

Also sprach Mark Schenk:

 > The first thing I would like to note, is the question whether these things  
 > actually belong in the styling layer. Is the creation of cross-references  
 > and tables of content not more like a transformation, which should be  
 > styled afterwards? In other words, do these extensions belong in CSS? I  
 > haven't really formed an opinion on this yet, though.

I believe in separating transformations from styling. However, there
are some small interesting things happening in the interface between
the two. Take cross-references as an example: it's not possible to
find what to transform them into (i.e. the page number) without
formatting the document. So, I think it is appropriate for a
style-centric language like CSS to do this. Another example is the
"text-transform" property. Borderline, but convenient.

 > So, to be clear: that would also make it possible to add strings or other  
 > content before the leader, as in:
 > ul.toc a::after {
 >         content: "some string here" leader(' . ')  
 > target-counter(attr(href), page);
 > }


 > or instead of a string, that could be a 'target-content' value or  
 > something similar. That leads me to the next question, where is the  
 > target-counter property currently defined?
 > I find it in this document:
 > http://www.w3.org/1999/06/WD-css3-page-19990623
 > but I do not find it in the Candidate Recommendation for CSS3 Paged Media,  
 > which I think replaces the aforementioned draft:
 > http://www.w3.org/TR/css3-page/
 > nor in the draft for Generated Content
 > http://www.w3.org/TR/css3-content/
 > So where is it (if at all) defined?

As noted in the article, not all features used are desribed in a WD.
The 'target-content' function has been around for a long time and it
deserves a description in a more recent WD.

 > On a related note, the Abstract on http://www.w3.org/TR/css3-page/ is  
 > incorrect. The abstract finishes with "Finally it extends generated  
 > content for the purpose of cross-references with page numbers." but I  
 > don't find that on the page, so the line should be removed.


 > ul.toc a::after {
 >         content: leader('_') leader('.') target-counter(attr(href), page);
 > }
 > would the available space be split between '_' and '.', and would that be  
 > based on an equal number of characters, or an equal total width of the set  
 > of leaders?

In Prince, it's based on the width. I think this is correct, but it
should be clearly specified as such.

 > Furthermore, to what box types would leaders be limited? It would make  
 > little sense in inline boxes for instance. And, if I'm not mistaken, it  
 > would have to be defined how it works in shrink-to-fit kind of width  
 > calculations.

Agreed. The basic idea is to lay out the content without the leaders,
find the empty space on each line and divide it up between the
speficified leaders. This way, leaders should not change the shrink
wrap algorighm in any way.

              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Thursday, 1 December 2005 12:55:43 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:22 UTC