/* TECHNICAL GUIDE MEDIA QUERIES Version 1.3.3 ======================= MEDIA & FEATURE QUERIES ======================= DIVISIONAL BRANDING */ @media amzn-kf8 { .banner_pelican { padding-left: 2.2em; } } @media amzn-et { .banner_penguin, .banner_pelican, .banner_puffin, .banner_ladybird { background-size: contain; } .banner_pelican { padding: 30px 10px 30px 3.5em; background-color: #FFF; /* Fixes ET background positioning issue */ } } /* SIDEBAR ADAPTIVE MEDIA QUERIES, SIDEBAR ET and KiOS FIXES */ .maincontent_wrapper { /* This isn't a media query but has been placed in this sheet so that ADE 3.x ignores it. Allows main content to fill remaining space on-screen, and not be bound to a fixed percentage. */ width: auto; float: none; } @media screen and (max-width: 512px), amzn-et, amzn-kf8 and (device-height:1024px) and (device-width: 758px), amzn-kf8 and (device-height: 768px) and (device-width: 1024px) { .sidebar_wrapper, .image_sidebar_wrapper { float: none; font-size: 0.85em; text-align: left; width: 100%; max-width: 100%; } .sidebar_wrapper p { text-align: left; } .sidebar_wrapper h1, .sidebar_wrapper h2, .sidebar_wrapper h3, .sidebar_wrapper h4, .sidebar_wrapper h5 { text-align: left; } .image_sidebar_wrapper { text-align: center; overflow: hidden; } .image_sidebar_wrapper img { width: 33.3%; /* Divide width of sidebar (100) by the number of child images, in this example, 3 images. Works best with 3 to 5 square-aspect images. */ clear: none; /* If the total sum of the image widths is less than 100, they will be center aligned at the top of the page */ display: inline-block; } h1 + .sidebar_wrapper, h2 + .sidebar_wrapper, h3 + .sidebar_wrapper, h4 + .sidebar_wrapper { margin-top: 2em; } .maincontent_wrapper { float: none; padding: 0px; width: 100%; } .bordered_sidebar_content { border: 0; padding: 0; } } /* THUMBNAIL TOC GRID FOR KINDLE ET */ @media amzn-et { div.chapter_toc { display: none; } h2.chapter_toc_header { display: none; } } /* VERTICAL CENTERING */ @supports (display: flex) { .cover_image, .image_full, .image_full_landscape, .image_full_caption, .image_full_caption_landscape, .brand_logo_solo, .vertical_center { height: 96%; height: 96vh; margin-top: 0px !important; text-align: center; display: -webkit-flex; display: flex; align-items: center; flex-direction: column; justify-content: center; } .brand_logo_solo img, .vertical_center figure { margin-top: -60px; } } /* OPTIONAL SCALING THUMBNAILS [OPTIONAL / EXPERIMENTAL] Adds scaling animation to Thumbnail TOC Grid for desktop and web. */ .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%;} } /* KINDLE-SPECIFIC */ @media not amzn-kf8 { .kf8_only { display: none; } } @media amzn-kf8 { .epub3_only { display: none; } } /* ADE 4 / Readium Fixes */ @media (hover: hover) { @supports not (break-after: always) { .pagebreak_after, div.chapter_toc, .image_full, .image_full_caption, .image_full_landscape, .image_full_caption_landscape { /* ADE4 , Readium fix ... breaks Apple Books */ break-after: always; -webkit-column-break-after: always; } :root[__ibooks_internal_theme] .pagebreak_after, :root[__ibooks_internal_theme] div.chapter_toc { /* Override ADE4 , Readium fix to restore breaks on Apple Books */ break-after: always; page-break-after: always; } } @supports not (break-before: always) { .pagebreak_before { /* ADE4 , Readium fix ... breaks Apple Books */ break-before: always; -webkit-column-break-before: always; } :root[__ibooks_internal_theme] .pagebreak_before { /* Override ADE4 , Readium fix to restore breaks on Apple Books */ break-before: always; page-break-before: always; } } @supports not (break-inside: avoid) { img, .image_full, .image_full_caption, .image_full_landscape, .image_full_caption_landscape { /* ADE4 , Readium fix ... breaks Apple Books */ break-inside: avoid; -webkit-column-break-inside: avoid; } :root[__ibooks_internal_theme] img { /* Override ADE4 , Readium fix to restore breaks on Apple Books */ break-inside: avoid; page-break-inside: avoid; } } }