Re: Printing a Book with CSS

On Wed, 30 Nov 2005 12:06:41 +0100, Håkon Wium Lie <howcome@opera.com>  
wrote:

I'm rather interested by this example of using CSS for creating high  
quality print output: I disregarded HTML/CSS as an option for my MSc.  
thesis for precisely the reasons you are trying to address in the ALA  
article.

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.


>   In a more complex example, the 'leaders' value is combined with other
>   values on the 'content' property:
>
>     ul.toc a::after {
>       content: leader(' . ') target-counter(attr(href), page);
>     }

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?

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.


>   If there are more than one 'leaders' value, the available space on
>   that line will be split equally between them so that the line is
>   filled.

so if you say:

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?


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.

-- 
Mark Schenk
http://www.markschenk.com

Received on Thursday, 1 December 2005 12:34:51 UTC