Forum How do I...?

italics on TOC

ixgal
hi,
I am using this style on my table of content:

#toc a[href] {
content: content() leader('.') target-counter(attr(href), page);
}

The problem is that some words in italics lose their format on the TOC. Is there a way to keep that format?

Thanks!
mikeday
Better not to use content(), and use the ::after pseudo-element instead:
#toc a[href]::after {
    content: leader('.') target-counter(attr(href), page)
}