W3C home > Mailing lists > Public > www-style@w3.org > June 2006

Re: [css3-gcpm] Leaders

From: Håkon Wium Lie <howcome@opera.com>
Date: Fri, 16 Jun 2006 14:41:15 +0200
Message-ID: <17554.42731.610248.66890@localhost.localdomain>
To: werner.donne@re.be
Cc: www-style@w3.org

Also sprach Werner Donné:

 > > The reason for having it is to achieve uniform leader sizes on pages
 > > with different font sizes. For example, in a toc you may have chapter
 > > entries with a (relatively) big size, and a subsection entry with a
 > > (relatively) small size. However, most often, you want the leaders
 > > extending from the text to have a uniform size.
 > This can be achieved without adding something new:
 > <span class="leader"/>
 > span.leader::after
 > {
 >   content: leader(dotted);
 >   font-size: 10pt;
 > }
 > You override anything that is inherited and for which you don't want the
 > inherited value.

But, consider this example:

  ul.toc a::after {
    font-size: 10pt;
    content: leader('. . . ') target-counter(attr(href), page);

By setting the font size to get leaders right, you also set the size
on page numbers. Typically, you want the font size of the page numbers
to match that of the text.

 > >  > 3) The WD asks "Should other properties influence the appearance of leaders?".
 > >  >    If leaders are repetitions of glyphs they are inline material and
 > >  >    hence any property that applies to inline elements should also
 > >  >    apply to leaders.
 > > 
 > > So, if 'letter-spacing' is set on a toc entry, dotted leaders should
 > > be spaced out as well?
 > Of course, and if you don't want the letter-spacing of the toc entry for
 > the leader, you can specify it as mentioned in point 2.

Again, it would influcence other content in the pseudo-element; you
don't want extra spacing between page numbers.

              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Friday, 16 June 2006 12:41:24 GMT

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