/* Random House Ebook Template - last modified 13/12/2016 Version 1.0.3 =================== STYLESHEET CONTENTS =================== * BASE STYLES - BASE HEADING STYLES - BASE BODY STYLES - BASE PAGE STYLES * OVERRIDES - JUSTIFIED - LEFT ALIGNED - CENTERED - RIGHT ALIGNED - LEFT HAND MARGIN * HANGING INDENTS * EXTRACTS * TABLES * LISTS AND BULLETS * FOOTNOTES * FONT DIFFERENTIATION * EXTRACTS WITH FONT DIFFERENTIATION * IMAGES * REPLACE EMOJI CHARACTERS WITH TEXT - FIX **Paragraph style set as default to: justified, fist line indent 1em, no margin. Only use classes if you need to overide one or more of these styles.** **USE H1 FOR THE TITLE PAGE ONLY. USE H2 FOR ALL MAIN HEADERS AND H3, H4 or H5 FOR ALL SUB-HEADERS** **Only alter this style sheet where indicated below, look for notes that read "This can be adjusted"** **Please see note in "Random House Ebook Template Notes" PDF (pg 4) outlining when to use text-indent and when to use margin-left** */ /* PRH CORE ASSET - DO NOT DELETE!! (Used for class .noemoji only - please do not embed other fonts)*/ @font-face { font-family: "noemoji"; font-weight: normal; font-style: normal; /*src: url(../prh_core_assets/fonts/symbola.otf);*/ } /* END PRH CORE ASSET!! */ /* =========== BASE STYLES =========== */ @page { height: 100%; } body { font-size: 1em; margin: 0em; text-indent: 0em; padding: 0em; } /* BASE HEADING STYLES */ h1, h2, h3, h4, h5{ page-break-after: avoid; font-weight: normal; text-indent: 0em !important; padding: 0em !important; margin-left: 0em !important; display: block; width: 100%; } h1, h2{ text-align: center; } h3, h4, h5{ text-align: left; } h1{ margin: 2em 0em; font-size: 2em; } h2{ margin: 1em 0em 2em 0em; font-size: 1.5em; } h3{ margin: 1.3em 0em;/*Bottom margin can be adjusted to match PDF. Please do not alter top margin*/ font-size: 1.3em; } h4{ margin: 1.2em 0em;/*Bottom margin can be adjusted to match PDF. Please do not alter top margin*/ font-size: 1.2em; } h5{ margin: 1em 0em;/*Bottom margin can be adjusted to match PDF. Please do not alter top margin*/ font-size: 1em; } h2 + h2{ margin-top: -1em; } h2 + h3, h2 + h4, h2 + h5 { margin-top: -0.5em; } h3 + h4, h3 + h5 { margin-top: 0em; } h4 + h5{ margin-top: 0em; } /* BASE BODY STYLES */ p{ text-align: justify; margin: 0em; text-indent: 1em; orphans: 2; widows: 2; } .pagebreak_before { page-break-before: always; margin-top: 0em !important; padding-top: 0em !important; } .pagebreak_after { page-break-after: always; margin-bottom: 0em !important; padding-bottom: 0em !important; } .small_caps{ font-size: 75%; /*Font must be set to uppercase within HTML*/ } .smaller_font{ font-size: 85% } .section_break{ margin: 1em 0em; text-align: center; } /* BASE PAGE STYLES */ /* CONTENTS PAGE - LINKS */ .contents_link a { text-decoration: none; } .contents_link div{ text-align: left; } /* PAGE MARGINS */ div.part_page{ /*Use this for Part/Section pages EXCEPT if you are using a full page image.*/ margin: 20% 10% 0% 10%; page-break-after: always; } div.prelim_page{ /*Use this for Dedication & Epigraph pages*/ margin: 15%; } /* HEADER WRAP */ div.header_wrap{ margin: 1em auto 0em auto; text-align:center; page-break-inside: avoid; } /* ========= OVERRIDES ========= */ /* JUSTIFIED */ .not_indented{ text-indent: 0em; } .space_after{ margin-bottom: 1em; } .space_after_not_indented{ margin-bottom: 1em; text-indent: 0em; } .no_header{ margin-top: 25%; text-indent: 0em; } /* LEFT ALIGNED */ .left{ text-align: left; } .left_space_after{ text-align: left; margin-bottom: 1em; } .left_not_indented{ text-align: left; text-indent: 0em; } .left_space_after_not_indented{ text-align: left; margin-bottom: 1em; text-indent: 0em; } /* CENTERED */ .centered{ text-align: center; text-indent: 0em; } .centered_space_after{ text-align: center; margin-bottom: 1em; text-indent: 0em; } /* RIGHT ALIGNED */ .right{ text-align: right; text-indent: 0em; } .right_space_after{ text-align: right; margin-bottom: 1em; text-indent: 0em; } /* LEFT HAND MARGIN */ .margin_left1{ margin-left: 1em; text-indent: 0em; } .margin_left2{ margin-left: 2em; text-indent: 0em; } .margin_left1_space_after{ margin-left: 1em; margin-bottom: 1em; text-indent: 0em; } .margin_left2_space_after{ margin-left: 2em; margin-bottom: 1em; text-indent: 0em; } /* =============== HANGING INDENTS =============== */ .hanging_indent { margin: 1em auto 1em 0em; } .hanging_indent p { margin-left: 1em !important; text-indent: -1em !important; } .hanging_indent_space_after { margin: 1em auto 1em 0em; } .hanging_indent_space_after p { margin-left: 1em !important; text-indent: -1em !important; margin-bottom:1em; } .hanging_indent_header { margin-left: 1em !important; text-indent: -1em !important; /*This class can be adjusted as needed*/ } .index { margin: 1em auto 1em 0em; } .index p { margin-left: 1em; text-indent: -1em; } .index p.margin_left1 { margin-left: 2em; } .index p.margin_left2 { margin-left: 3em; } /* ======== EXTRACTS ======== */ .extract{ margin: 1em; } .extract_small_font{ margin: 1em; font-size: 80%; } .extract_no_space_after{ margin: 1em 1em 0em 1em; } .extract_no_space_after_small{ margin: 1em 1em 0em 1em; font-size: 80%; } .hanging_indent_extract { margin: 1em; } .hanging_indent_extract p { margin-left: 1em; text-indent: -1em; } .stanza{ margin-bottom: 1em; } /* ====== TABLES ====== Only use tables for tabular data which cannot be formatted in any other way, and for tables which are MAXIMUM 2/3 columns wide. For complex/long tables, please use an image instead (png or gif). */ table{ margin: 1em auto 0em 0em; } td{ vertical-align: top; padding: 3px; } /* ====== LISTS AND BULLETS ====== */ ul, ol{ margin: 1em; text-align: left; } ol.alt_list_style{ list-style-type: lower-latin; /*This can be adjusted*/ } ol.alt_list_style li{ margin-bottom: 1em; /*This can be adjusted or removed*/ } ul.alt_list_style{ list-style-type: square; /*This can be adjusted*/ } ul.alt_list_style li{ margin-bottom: 0em; /*This can be adjusted or removed*/ } /* ====== FOOTNOTES ====== */ a.footnote { display: inline; vertical-align: super; font-size: 65%; } aside { display: block; } aside a{ vertical-align: super; font-size: 70%; } a.endnote { font-size: 65%; } /* ====== FONT DIFFERENTIATION ====== */ span.sans_serif{ font-family: sans-serif; } span.monospace{ font-family: monospace; } span.font_color{ color: rgb(254,80,9); /*This can be adjusted. Do not use colours which are too light to read on Kindle e-ink devices*/ } span.underline { text-decoration:underline; } span.strikethrough { text-decoration:line-through; } span.overline { text-decoration:overline; } /* ====== EXTRACTS WITH FONT DIFFERENTIATION ====== */ .extract_sans_serif{ font-family: sans-serif; margin: 1em; } .extract_monospace{ font-family: monospace; margin: 1em; } /* ====== IMAGES ====== */ img { /*-- iOS8 Image Fix --*/ display: inline-block; } div.caption { width: 100%; margin: -1em auto 1em auto; padding: 0px; page-break-before: avoid; text-align: center; font-size: 0.8em; line-height: 1.3em; } /* ========================================= Inline Images Example (Apply to image, adjust values as needed) ========================================= */ .inline_image { height: 0.2em; /* Variable, adjust as necessary */ vertical-align: middle; /* Top, middle, bottom as needed */ } .inline_image_2 { height: 0.3em; /* Variable, adjust as necessary */ vertical-align: middle; /* Top, middle, bottom as needed */ } .inline_image_3 { height: 1.5em; /* Variable, adjust as necessary */ vertical-align: top; /* Top, middle, bottom as needed */ } /* ================== Extra Small Images ================== */ .portrait_xsmall { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 28%; } .portrait_xsmall img { page-break-inside: avoid; width: 100%; } .portrait_xsmall + .caption { width: 35%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } .landscape_xsmall { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 50%; } .landscape_xsmall img { page-break-inside: avoid; width: 100%; } .landscape_xsmall + .caption { width: 60%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } /* ============ Small Images ============ */ .portrait_small { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 35%; } .portrait_small img { page-break-inside: avoid; width: 100%; } .portrait_small + .caption { width: 35%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } .landscape_small { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 60%; } .landscape_small img { page-break-inside: avoid; width: 100%; } .landscape_small + .caption { width: 60%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } /* ============== Default Images ============== */ .portrait_default { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 40%; } .portrait_default img { page-break-inside: avoid; width: 100%; } .portrait_default + .caption { width: 40%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } .landscape_default { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 70%; } .landscape_default img { page-break-inside: avoid; width: 100%; } .landscape_default + .caption { width: 70%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } /* ============= Medium Images ============= */ .portrait_medium { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 50%; } .portrait_medium img { page-break-inside: avoid; width: 100%; } .portrait_medium + .caption { width: 50%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } .landscape_medium { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 84%; } .landscape_medium img { page-break-inside: avoid; width: 100%; } .landscape_medium + .caption { width: 84%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } /* ============================================== Large Images + Double Page Spread (DPS) Images ============================================== */ .portrait_large { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 65%; } .portrait_large img { page-break-inside: avoid; width: 100%; } .portrait_large + .caption { width: 65%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } .landscape_large { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 100%; } .landscape_large img { page-break-inside: avoid; width: 100%; } .landscape_large + .caption { width: 100%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; } /* ================ FULL PAGE IMAGES ================ */ .image_full { text-align: center; page-break-before: always; page-break-after: always; page-break-inside: avoid; padding: 0px; margin: 0px auto; height: 99%; height: 99vh; width: 100%; } .image_full img { page-break-inside: avoid; } .image_full_caption { text-align: center; page-break-before: always; page-break-after: avoid; page-break-inside: avoid; padding: 0px; margin: 0px auto; width: 100%; } .image_full_caption img { page-break-inside: avoid; width: 87%; } .image_full_caption + .caption { width: 90%; /* Caption width can be adjusted here if needed */ page-break-before: avoid; page-break-after: always; margin-top: 0.5em; } .cover_image { text-align: center; page-break-inside: avoid; overflow: hidden; padding: 0px; margin: 0em auto; height: 99%; height: 99vh; width: 100%; } .cover_image img { page-break-inside: avoid; height: 100%; } /* ==================== Plate Section Images ==================== */ .plate_image_portrait { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 70%; } .plate_image_portrait img { page-break-inside: avoid; width: 100%; } .plate_image_landscape { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 90%; } .plate_image_landscape img { page-break-inside: avoid; width: 100%; } .plate_image_portrait + .caption, .plate_image_landscape + .caption { width: 90%; /* Caption width can be adjusted here if needed */ font-style: normal; page-break-inside: avoid; } .plate_image_portrait_narrow { text-align: center; page-break-inside: avoid; margin: 1.5em auto; width: 40%; } .plate_image_portrait_narrow img { page-break-inside: avoid; width: 100%; } .plate_image_portrait_narrow + .caption { width: 90%; /* Caption width can be adjusted here if needed */ font-style: normal; page-break-inside: avoid; } /* ============= REPLACE EMOJI CHARACTERS WITH TEXT - WEBKIT FIX ============= */ .noemoji { font-family: "noemoji"; font-size: inherit; /* variable */ font-weight: normal; } /* -- PLEASE ADD ADDITIONAL STYLES BELOW IF NEEDED -- */ h3.also_H{ page-break-after: avoid; font-weight: normal; text-indent: 0em !important; padding: 0em !important; margin-left: 0em !important; display: block; width: 100%; margin-top: 2em; margin-bottom: 1em; text-align: center; } .centered_space_after_AL{ text-align: center; margin-bottom: 0.5em; text-indent: 0em; } .space_before_not_indented{ margin-top: 1em; text-indent: 0em; } .space_after_not_indented_TS{ margin-top: 25%; margin-bottom: 1em; text-indent: 0em; } .pre_H { margin-top: 0em; margin-bottom: 2em; font-size: 1.8em; text-indent: 0em; } .chapter_number { margin-top: 3em; margin-bottom: 3em; } .Head_A { margin-top: 0em; margin-bottom: .5em; text-align: center; } .Head_B { margin-top: 1emem; margin-bottom: 1em; text-align: center; } .part_number { margin-top: 5em; font-size: 2.5em; } div.sans_part { font-family: sans-serif; } .dialogue_invtervie_first { margin-top: 1em; text-indent: -1em; margin-left: 1em; text-align: left; } .dialogue_interview { margin-top: 0em; text-indent: -1em; margin-left: 1em; text-align: left; } .letter_text_TS { margin-top: 1em; text-indent: 1em; } .part_toc { margin-top: 1em; }