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

Re: Printing a Book with CSS

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Wed, 30 Nov 2005 10:31:10 -0800
Message-ID: <003701c5f5dc$3cb0b0f0$c302000a@internal.toppro.net>
To: "Laurens Holst" <lholst@students.cs.uu.nl>, <www-style@w3.org>


----- Original Message ----- 
From: "Laurens Holst" <lholst@students.cs.uu.nl>
To: <www-style@w3.org>
Sent: Wednesday, November 30, 2005 9:49 AM
Subject: Re: Printing a Book with CSS


|
| Andrew Fedoniouk schreef:
| > html is:
| >
| > <li>A short title<span class="filler" />1</li>
|
| FWIW, Prince’s CSS method requires no additional markup and does the
| page numbering automatically… The CSS is also more compact.
|

As I mentioned that was straightforward example.

In any case TOC generation by itself *is a transformation*
of original document so changes are acceptable here (my guess).

If you want it without additional markup then
you can use something like this (rendering result will be
slightly different):

.tocnumber
 {
   border-bottom:1px dashed #000;
   display:inline-block;
   padding-left:100%%;
   content: target-page-number;
 }

html is:

<li>A short title<a class="tocnumber" /></a></li>

The idea here is simple.  %% units can cover many holes including
this one. Inventing special CSS attribute for each particular
case is just not a good design practice. Don't
forget that number of defined attributes in CSS is
increasing computational complexity of style resolution.

One more example of  %% units [1,2] - famous
side bar layout:
http://www.terrainformatica.com/w3/sidebars.jpg
this is done solely by CSS. No tables, floats and additional
markup involved.

Andrew Fedoniouk.
http://terrainformatica.com

[1] the flow attribute and %% units
 http://www.terrainformatica.com/htmlayout/flow.whtm
[2] %% units per se
 http://www.terrainformatica.com/htmlayout/fspu.whtm
Received on Wednesday, 30 November 2005 18:31:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:41 GMT