/* Custom Take Control CSS styles for Leanpub EPUB and Mobi */ /* This CSS file is for a RED look. */ /* Last edited on 2017-08-23. */ /* Set a body font and bring in the right and left margins slightly */ body { font-family: "Georgia", serif; margin-left: 1.5em; margin-right: 1.5em; font-size: 85%; } /* Force Verdana normal (no small caps for TOC) for headings. The page-break-after:avoid doesn't seem to be honored in iBooks. */ h1#toc, h1, h2, h3, h4, h5, h6, h7 { font-family: "Verdana", sans-serif; font-variant: normal; color: #BA001C; /* HEADING COLOR TO CHANGE */ page-break-inside: avoid; page-break-after: avoid; } /* Put a background color on H2s (really our H1s), and make the font bigger */ h1#toc, h1, h2 { width: 100%; background-color: #BA001C; /* HEADING COLOR TO CHANGE */ color: white; font-size: 2em !important; line-height: 100%; padding-top: 0.75em; padding-bottom: 0.75em; padding-left: 0.25em; margin-top: 0em !important; margin-bottom: 0.5em !important; text-align: left; font-weight: bold; } /* Put borders around H3s (really our H2s) but avoid the sidebar H3s */ h3 { border-width: 1px; border-style: solid none solid none; border-color: #BA001C; /* HEADING COLOR TO CHANGE */ margin-top: 0em !important; margin-bottom: 0.5em !important; font-size: 1.3em !important; } /* Keep sidebar headings black - comment out for some colors */ div.sidebarish h3, aside h3 { border-style: none; font-size: 1.1em !important; /* color: black; */ } /* Define H4 a little larger than H5 and H6*/ h4 { font-size: 1.2em !important; } /* Define H6 for Quick Start */ h5,h6 { font-size: 1em !important; font-style: italic; } /* Increase the line height of standard text. Added widows and orphans controls for non-iBooks EPUB readers that do support them. */ p { line-height: 135%; widows: 2; orphans: 2; } /* Make sure the links are blue #333399 (new) and purple (visited) and underline (hover) */ a:link { color: #333399; text-decoration: none; } a:hover { color: purple; text-decoration: underline; } a:visited { color: purple; text-decoration: none; } /* Shrink the font size of captions, and add a little padding underneath */ p.caption, figure.image figcaption { font-family: "Verdana", sans-serif; font-weight: normal; font-size: 80%; } /* This sets the color and size of code and pre text, both of which have to match due to how Leanpub sometimes does code. And the div.code-block below makes sure the blocks are the same size as our normal code, which can be inline. */ code, pre { color: #5215C0; font-family: "Courier", monospace; font-size: 100%; } div.code-block { font-size: 100%; } blockquote { font-style: italic; } /* Prevents overflow in non-iBooks EPUB readers */ /* Turned off max-width for TCo TextExpander (2015-07-08) because of how screenshots were resized manually. Turn this on if the screenshots seem too small. */ img, figure.image { max-width: 100%; text-align: left; margin-left: inherit; margin-right: inherit; } /* Indent screenshots and captions slightly, to match the list-indent - the trick is to set a width and use a padding-left in em, after turning on the box-sizing approach. The bottom margin is necessary to prevent note boxes after screenshots from being too close. If you want screenshots bordered, uncomment the border styles in the third directive down. Added page-break-inside:avoid to prevent breaks across pages.*/ div.image-with-caption, figure.image { -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ -moz-box-sizing: border-box; /* Firefox, other Gecko */ box-sizing: border-box; /* Opera/IE 8+ */ text-align: left; margin-bottom: 0.75em; width: 100%; padding-left: 2em; page-break-inside: avoid; } div.image-with-caption p.caption, figure.image figcaption { text-align: left; } div.image-with-caption img, figure.image img { margin-top: 0.75em; /* border-style: solid; border-width: 1px; */ } /* Outdent screenshots that are nested in lists. Not all screenshots in lists are actually nested properly in the HTML, but the 8% indent should work for them as well. */ li > div.image-with-caption.center, li > figure.image.center { padding-left: 0em; margin-left: 0em; } /* Increase the line height in lists to match p tags, and pad out each list item. Also, left-align bullets and numbers. */ ul, ol { line-height: 135%; list-style-position: outside; padding-left: 2em; } li { margin-top: 0.7em; margin-bottom: 0.7em; } /* Fix line height of p tags and figcaptions embedded in li tags */ li p, li figcaption { line-height: 135%; margin-top: 0.7em; } /* Make nested lists use letters and different bullets, and numbers for numbered lists inside bullet lists */ li ol { list-style-type: lower-alpha; } li ul { list-style-type: square; } ul li ol { list-style-type: decimal; } /* San-serif font for TOC list items and better padding for TOC */ .toc li { font-family: "Verdana", sans-serif; margin-bottom: 0.3em; line-height: 135%; } /* Chapters for ToC without Parts */ .toc.no-parts > li { font-size: 110%; margin-top: .8em; margin-bottom: 1em; } /* Sections for a ToC without parts */ .toc.no-parts > li > ul > li { font-size: 90%; } /* Sub-sections and below for a ToC without parts */ .toc.no-parts > li > ul > li > ul { font-size: 85%; } /* Style the tips and warnings and whatnot with a background color and rounded rectangle box. It's important that the margin settings be left and right only so there's space when multiple boxes stack. Added page-break-inside:avoid to prevent breaks across pages. */ div.sidebarish, aside { font-family: Verdana, sans-serif; font-size: 90%; margin-left: 0em; margin-right: 0em; padding-top: 0.45em; padding-bottom: 0em; padding-left: 0.85em; padding-right: 0.85em; background-color: #FFE5E9; /* SIDEBAR COLOR TO CHANGE */ border: 1px solid; border-radius: 10px; page-break-inside: avoid; } /* Bring the font size of captions in asides back up a little, and indents of captions in asides back out, which is necessary because sidebars add some left margin */ div.sidebarish p.caption, aside figure.image.center figcaption { font-size: 90%; margin-left: -0.8em !important; } /* Push the indents of captions in lists in asides back in, which is necessary after the previous statement */ aside li figure.image.center figcaption { margin-left: 0em !important; } /* Bring indents of images in asides back out, which is necessary because sidebars add some left margin. */ div.sidebarish > div.image-with-caption img, aside > figure.image.center img { margin-left: -0.8em; } /* Outdent notes that are nested in lists. Ignored in iBooks too, I think. */ li > div.aside, li > aside { margin-left: -1.65em; } /* Make the chapter opening captions larger and blue and left-align the graphic. */ figure.chapter-image { font-size: 100%; color: #204B75; padding-left: 0em; }