/* TECHNICAL GUIDE COMPLEX CSS Version 1.0.1 ============== STYLESHEET TOC ============== Search any of the TOC entries below to navigate this stylesheet. - PRH CORE ASSETS - FONT EMBEDDING - CORE STYLES - OPTIONAL BASE COLORS - PUBLISHER FONT PAGE DECLARATION - HEADERS (Complex) - FLOATED IMAGES | FLOATED TEXT BOXES - SIDEBARS - THUMBNAIL TOC GRID - MEDIA QUERIES PRH CORE ASSETS - DO NOT DELETE ============================================================ */ @font-face { font-family: "noemoji"; font-weight: normal; font-style: normal; /*src: url(../prh_core_assets/fonts/symbola.otf);*/ } @font-face { font-family: "penguin"; font-weight: normal; font-style: normal; /* src: url(../prh_core_assets/fonts/penguin.otf);*/ } /* ============================================================ FONT EMBEDDING ============================================================ All variations of the same font must share the exact same CSS font-family name. This allows us to call the relevant font style or font weight in markup by using and tagsā€”no extra classes required. - Always use a font-stack that falls back to either 'serif' or 'sans-serif'. */ @font-face { font-family: "base_font"; font-weight: normal; font-style: normal; /*src: url(../fonts/base_font-regular.otf);*/ } @font-face { font-family: "base_font"; font-weight: normal; font-style: italic; /* src: url(../fonts/base_font-italic.otf);*/ } @font-face { font-family: "base_font"; font-weight: bold; font-style: normal; /* src: url(../fonts/base_font-bold.otf);*/ } @font-face { font-family: "base_font"; font-weight: bold; font-style: italic; /* src: url(../fonts/base_font-bolditalic.otf);*/ } /* ============================================================ CORE STYLES ============================================================ */ /* Disable webkit default tap zone highlighting color, USE ONLY IF SPECIFICALLY REQUESTED. html { -webkit-tap-highlight-color: rgba(0,0,0,0); }*/ /* Set global font size for the body element. html { font-size: 16px; }*/ body { font-family: "base_font", sans-serif; } /* ============================================================ OPTIONAL BASE COLORS ============================================================ */ .primary_color { color: #ef6b00; } .bg_primary_color { background-color: #ef6b00; } .secondary_color { color: #007891; } .bg_secondary_color { background-color: #007891; } .tertiary_color { color: #5b5b5b; } .bg_tertiary_color { background-color: #5b5b5b; } /* ============================================================ PUBLISHER FONT PAGE DECLARATION ============================================================ */ .publisher_fonts { font-family: "base_font", sans-serif; text-align: center; text-indent: 0em; margin-bottom: 0em; font-size: 0.8em; } .publisher_fonts strong { font-weight: bold; font-size: 1.2em; margin-bottom: 0em; } .publisher_icon { text-align: center; page-break-inside: avoid; overflow: hidden; clear: both; margin: 140px auto 0em auto; width: 8%; } .publisher_icon img { page-break-inside: avoid; width: 100%; } .penguin { font-family: "penguin", sans-serif; text-align: center; font-size: 3em; text-indent: 0em; margin-top: 0.3em; color: #000 } /* ============================================================ HEADERS (Complex) ============================================================ */ h1 { color: #ef6b00; } h2 { color: #ef6b00; } h5 { font-weight: bold; } h6 { font-weight: bold; } /* ============================================================ FLOATED IMAGES | FLOATED TEXT BOXES ============================================================ */ .floatbox_left { font-size: 80%; text-align: left; width: 25%; margin: 0em 1.5em 1.5em 0em; padding: 5px; border: 1px solid #ccc; border-radius: 2px; background-color: rgb(240,240,240); float: left; } .floatbox_right { font-size: 80%; text-align: left; width: 25%; margin: 0em 0em 1.5em 1.5em; padding: 5px; border: 1px solid #ccc; border-radius: 2px; background-color: rgb(240,240,240); float: right; } figure.floatimage_right { position: relative; float: right; margin-top: 0.5em; margin-right: 0em; margin-left: 1.5em; text-align: center; width: 28%; page-break-inside: avoid; } figure.floatimage_left { position: relative; float: left; margin-top: 0.5em; margin-right: 1.5em; margin-left: 0em; text-align: center; width: 28%; page-break-inside: avoid; } .floatimage_right img, .floatimage_left img { page-break-inside: avoid; border-radius: 3px; /* Optional */ width: 100%; } .floatimage_right figcaption, .floatimage_left figcaption { text-align: left; width: 95%; margin-left: auto; margin-right: auto; } /* ============================================================ SIDEBARS ============================================================ */ .sidebar_wrapper { width: 25%; float: left; margin-right: 3%; margin-top: 0.4em; padding: 0px; font-size: 0.75em; font-weight: normal; text-align: left; text-indent: 0px; } .maincontent_wrapper { float: right; width: 71%; margin-top: 0em; padding: 0px; } .maincontent_wrapper + * { clear: both; } .maincontent_wrapper > *:first-child { margin-top: 0px; } .maincontent_wrapper > *:last-child { margin-bottom: 1.5em; /* Prevents overflow on subseqent elements that themselves have overflowed content */ } .sidebar_wrapper .ingredient_header { font-family: "base_font"; font-weight: bold; color: #ef6b00; text-align: inherit; margin-top: 1.5em; margin-bottom: 0.5em; } .sidebar_wrapper .ingredient_header:first-child { margin-top: 0em; } .sidebar_wrapper p { text-indent: inherit; } .sidebar_wrapper .ingredient_items { list-style: none; padding: 0px; } .sidebar_wrapper .ingredient_items li { margin-bottom: 0.5em; text-indent: 0px; margin-left: 0px; } .sidebar_wrapper .stacked_image { float: left; width: 100%; margin: 0px; padding: 0px; } /* SIDEBAR ADAPTIVE MEDIA QUERIES */ /*@media screen and (max-width: 512px), amzn-kf8 and (device-height:1024px) and (device-width: 758px) { .sidebar_wrapper { float: none; width: 100%; margin: 0em 0em 1.5em 0em; padding: 0px; } .sidebar_wrapper .stacked_image { width: 33.33%; /* Divide width of sidebar by the number of child images, in this example, 3 images. Works best with 3 to 5 square-aspect images. display: inline; margin-bottom: 1.5em; } .maincontent_wrapper { float: none; clear: both; width: 100%; } }*/ /* ============================================================ THUMBNAIL TOC GRID ============================================================ */ div.chapter_toc { width: 100%; padding: 0px; margin: 0px; text-align: center; } div.chapter_toc_thumb { text-align: center; display: inline-block; width: 23.4%; padding: 0px; margin: 1px 2px 1px 2px; } div.chapter_toc_thumb img { width: 100%; border-radius: 4px; } h2.chapter_toc_header { font-size: 2.4em; line-height: 1.1em; margin-bottom: 0em; margin-top: 0px; padding: 0px; page-break-before: always; text-align: center; } h2.chapter_toc_header .subhead { font-size: 0.35em; color: #000; /* Match body font color */ line-height: 1.3em; margin-top: 0.4em; } h2.chapter_toc_header .button { display: block; font-size: 0.27em; line-height: 1.5em; margin: 0.5em auto 1em auto; } .chapter_toc a { border: 0px; } h2#chapter_toc_text { page-break-before: always; clear: both; } ol.chapter_toc_text { font-size: 0.85em; text-align: left; list-style-type: none; padding-left: 0px; } .chapter_toc_text > li { margin-bottom: 0.5em; padding-left: 0em; /**/ margin-left: 1.5em; text-indent: -1.5em; position: relative; } .chapter_toc_text ol li { list-style-type: none; margin-top: 0.25em; } .chapter_toc_text a, .chapter_toc_text a:visited { color: #000; text-decoration: none; border-bottom: none; } .chapter_toc_text ol li a, .chapter_toc_text ol li a:visited { color: #000; text-decoration: none; font-style: italic; /* Optional */ border-bottom: none; } .chapter_toc_text > li > a::before { content: "\25B8 \FE0E"; text-align: left; width: 1em; margin-right: 0.5em; color: #ef6b00; /* variable */ } /* BEGIN SCALING THUMBNAILS [OPTIONAL / EXPERIMENTAL] Adds scaling animation to Thumbnail TOC Grid above, use only if specified! */ .chapter_toc a:hover img, .chapter_toc a:focus img, .chapter_toc a:active img { -webkit-animation: scaleThumb 0.2s; animation: scaleThumb 0.2s; -webkit-transform: translate3d(0, 0, 0); /* Force hardware acceleration */ } /*@-webkit-keyframes scaleThumb { 0%, 100% {width: 100%;} 50% {width: 85%;} } @keyframes scaleThumb { 0%, 100% {width: 100%;} 50% {width: 85%;} }*/ /* ============================================================ ============================================================ MEDIA QUERIES ============================================================ ============================================================ */ /*@media not amzn-kf8 { .kf8_only { display: none; } } @media amzn-kf8 { .epub3_only { display: none; } }*/ /* === KF8 NIGHT-MODE FIX FOR HYPERLINKS === */ /*@media amzn-kf8 { .toc_level1 a, .toc_level1 a:visited { color: #0066ff; text-decoration: none; border-bottom: none; } .toc_level2 a, .toc_level2 a:visited { color: #0066ff; text-decoration: none; border-bottom: none; } }*/ /* === SIDEBAR LAYOUT FOR KINDLE IOS AZK MODE === */ /*@media amzn-kf8 and (device-height: 1024px) and (device-width: 768px), amzn-kf8 and (device-height: 768px) and (device-width: 1024px) { .sidebar_wrapper { display: block; width: 100%; text-align: left; float: none; font-size: 1em; margin-bottom: 2em; } .maincontent_wrapper { display: block; width: 100%; float: none; } .sidebar_wrapper p { text-align: left; font-size: 0.9em; } .sidebar_wrapper h5 { text-align: left; } }*/ /* ---------------------------------------- END SYLES ---------------------------------------- Koko Ekong for Penguin Random House, 2012/2013 kekong@randomhouse.co.uk */