Re: [css3-gcpm] Leaders

Håkon Wium Lie wrote:
> 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.
> 

In that case you can write:

<a href="..."><span class="leader"/></a>

span.leader::after
{
  font-size: 10pt;
  content: leader('...');
}

a::after
{
  content: target-counter(attr(href), page);
}

>  > >  > 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
>               Håkon Wium Lie                          CTO °þe®ª
> howcome@opera.com                  http://people.opera.com/howcome
> 
> 

-- 
Werner Donné  --  Re
Engelbeekstraat 8
B-3300 Tienen
tel: (+32) 486 425803	e-mail: werner.donne@re.be

Received on Friday, 16 June 2006 13:00:04 UTC