View Single Post
Old 03-27-2014, 09:47 PM   #1
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Inline TOC formatting

I generated a 3 level inline TOC, and wanted to change the styling for the different levels

In Sigil, each level had it's own class, so it was trivial to replace Sigil's TOC.CSS with the one that I liked to use

The Editor will generate a toc.xhtml file with a <ul> <li> <ul> <li> etc. nested, and with the <style type="text/css"> in the toc.xhtml file

If I change the CSS for the <li> the container value is inherited, and something like font-size:1.25em; really gets ugly.

1. IHMO it's be more flexible if each TOC level had it's own class

2. In the epub, I tweaked some generated settings, and the font-size I added really got messed up. Is there a correct way?

3. My end goal would be to have (maybe) ...

H1 enteries = bold, 2em, 1 em below,
H2 enteries = bold, 1em, 1 em below,
H3 enteries followed by another H3 = normal, 1em, 0 em below,
H3 enteries NOT followed by another H3 = normal, 1em, 2 em below

OK, that might be ugly, but it's an example of TOC level-specific styling

Open to alternatives, but in this case, I think Sigil's approach might possibly be more flexible
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	427
Size:	109.8 KB
ID:	120901  
Attached Files
File Type: epub test_toc.epub (6.1 KB, 287 views)
phossler is offline   Reply With Quote