View Single Post
Old 12-08-2009, 10:54 AM   #1
brewt
Boo-Frickety-Hoo-Erizer
brewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enough
 
brewt's Avatar
 
Posts: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
Trying to understand re-css-ification.

I've been looking long and hard to find a tool that would trim/clean up my over-abundant css across multiple files, and lo and behold, calibre just does it when making an epub. (thanks kg&team)

But I'm trying to understand some things about what it's doing. Attached are the before (styles.css) and after (stylesheet.css) files

It seems that when I have files that get cut up by Calibre (for chapterization), the <h1> references have been changed to <calibreXX> references:

Quote:
<h1><a name="_Toc246482036"></a><a name="_Toc174706503">12:</a></h1>
becomes

Quote:
<h1 id="calibre_toc_13" class="calibre11"><a name="_Toc246482036"></a><a name="_Toc174706503">12:</a></h1>
And when I look at the epub, the chapter headings aren't calling the right font (seems to be default font calls), despite the setup in the css:

This is eliminated from my css:

Quote:
h1
{mso-style-link:"Heading 1 Char";
margin-top:12.0pt;
margin-right:0in;
margin-bottom:12.0pt;
margin-left:0in;
text-align:left;
page-break-before:always;
page-break-after:avoid;
font-size:18.0pt;
font-family:"Frutiger Linotype","sans-serif";
font-variant:small-caps;
font-weight:bold;}
and is replaced(?) with

Quote:
.calibre11 {
display: block;
font-family: "Frutiger Linotype", sans-serif;
font-size: 1.66667em;
font-variant: small-caps;
font-weight: 700;
margin-bottom: 12pt;
margin-left: 0;
margin-right: 0;
margin-top: 12pt;
mso-style-link: "Heading 1 Char";
page-break-after: avoid;
page-break-before: always;
text-align: left
}

The cut-up chapter file looks fine in a browser, but not in ADE or the Calibre viewer. So what am I seeing here?

-bjc
Attached Files
File Type: zip styles.zip (1.4 KB, 207 views)
File Type: zip stylesheet.zip (1.2 KB, 260 views)
brewt is offline   Reply With Quote