/* Custom Take Control CSS styles for Leanpub EPUB and Mobi */ /* This CSS file is for a RED look, for "Take Control of 1Password" */ /* Last edited on 2013-09-25. */ /* Change List * 2013-07-05: Converted most px values to em (everything but borders). -ace * 2013-09-25: Fixed a variety of margin-related issues in iBooks, which doesn't like certain margin settings. Also set the H3 horizontal rules to 1px and colored. -ace */ /* 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 */ h1#toc, h1, h2, h3, h4, h5, h6, h7 { font-family: "Verdana", sans-serif; font-variant: normal; color: #BA001C; } /* Put a background color on H2s (really our H1s), and make the font bigger */ h1#toc, h1, h2 { width: 100%; background-color: #BA001C; color: white; font-size: 2em; line-height: 100%; padding-top: 0.75em; padding-bottom: 0.75em; padding-left: 0.25em; margin-top: 0em; margin-bottom: 1em; 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; font-size: 1.3em; } /* Keep sidebar headings black - comment out for some colors */ div.sidebarish h3 { border-style: none; /* color: black; */ } /* Define H4 a little larger than H5 and H6*/ h4 { font-size: 1.2em; } /* Define H6 for Quick Start */ h5,h6 { font-size: 1em; } /* Increase the line height of standard text */ p { line-height: 135%; } /* Make sure the links are blue (new) and purple (visited) and underline (hover) */ a:link { color: blue; 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 { text-align: left; font-family: "Verdana", sans-serif; max-width: 75%; font-weight: normal; font-size: 80%; } code { color: #5215C0; font-family: "Courier", monospace; font-size: 100%; } /* Prevents overflow in non-iBooks epub readers */ img { max-width: 75%; } /* Left-align screenshots and captions (The 1.5em indent to align screenshots with list text, as we do in the PDF, caused caption cutoff in iBooks so commented out.). 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. */ div.image-with-caption { text-align: left; margin-bottom: 0.75em; /* margin-left: 1.5em; */ } div.image-with-caption p.caption { text-align: left; } div.image-with-caption img { margin-top: 0.75em; /* border-style: solid; border-width: 1px; */ } /* Outdent screenshots that are nested in lists. Ignored by iBooks. */ li > div.image-with-caption { 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: 1.5em; } li { margin-bottom: 0.7em; } /* Fix line height of p tags embedded in li tags */ li p { 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. */ div.sidebarish { 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; border: 1px solid; border-radius: 10px; } /* Bring the font size of captions in asides back up */ div.sidebarish p.caption { font-size: 100%; } /* Outdent notes that are nested in lists. Ignored in iBooks too, I think. */ li > div.aside { margin-left: -0.85em; }