@charset "utf-8"; @namespace epub "http://www.idpf.org/2007/ops"; body { font-variant-numeric: oldstyle-nums; hyphens: auto; adobe-hyphenate: auto; font-kerning: normal; font-feature-settings: "kern", "liga", "clig", "onum", "pnum"; /* OpenType features to improve legibility if your viewer font supports it. Kerning, ligatures (blends letters together more naturally to make them flow better; for example, typing "fi" will join the top of the f with the dot above the i), old-style numbers (numbers take up same amount of space, useful for tables. so it lines up vertically), and proportional numbers (numbers take up different amount of space depending on size of number)*/ font-variant: common-ligatures oldstyle-nums proportional-nums; text-rendering: optimizeLegibility; /* Allows kerning and legibility improvements (most noticeable if you set your text smaller than 20px), however this will increase loading time. Delete if you're on a weaker device*/ -webkit-hyphens: auto; -moz-hyphens: auto; -epub-hyphens: auto; } /* Old mobi Kindle devices don't like certain Unicode characters like word joiners, so we have this class to hide them if the reader matches. Example (word joiner + em dash, with word joiner being removed if Kindle is detected): — */ @media amzn-mobi { .kf8only-inline { display: none; } } @media amzn-kf8 { .kf8only-inline { display: inline; } } p { margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; text-indent: 1em; } /* Use real small capitals if using a font that supports it. The font-variant:small-caps property creates fake small caps. This can turn an enjoyable book into a mediocre experience since you can tell they are fake in the blink of an eye. By using OpenType Features, we can use real small caps the typeface designer took special care getting right. Please note that if the font doesn’t support this feature, it will fall back to fake small caps. You can check if your preferred font supports smcp by using this site: https://wakamaifondue.com/ */ .smcp { font-feature-settings: "smcp", "c2sc"; -webkit-font-feature-settings: "smcp" 1; -moz-font-feature-settings: "smcp" 1; -ms-font-feature-settings: "smcp" 1; } @supports not (font-variant-caps: small-caps) { .smcp { font-variant: normal; /* Reset the OT low level, then... */ font-feature-settings: "smcp", "onum", "pnum", "c2sc"; /* Use OpenType features if available*/ } } @supports (font-variant-caps: small-caps) { .smcp { font-feature-settings: normal; /* Reset the OT low level, then... */ font-variant-caps: small-caps; /* fall back to forced small-caps since if smcp isn't supported */ } } /* This seems to be the best option for centering vertically. Put it in a div class. It creates a flex box around each body of text and centers it. Make sure to use the min-height property so that the container’s height can grow in case the user sets a huge font-size or else contents will collapse. Read more/test at https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Aligning_Items_in_a_Flex_Container */ @supports (display: -webkit-flex) or (display: flex) { .parent { min-height: 95vh; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; -webkit-justify-content: {value}; justify-content: {value}; align-items: center; justify-content: center; } } /* Used to put the footer at the very bottom of the "page," but it requires other flex boxes to be stacked on it like I use on Title.xhtml. Not sure if this is the best way as it might break if you use a large font size. Needs more testing. vertically aligning in CSS is janky and I want a true method of aligning a footer to the very bottom of the screen but I dunno how yet. */ .footer { display: flex; align-items: flex-end; justify-content: center; } /* Another option to perfectly center text vertically */ .perfect-center { margin: 50vh 0 0 0; text-align: center; -webkit-transform: translateY(-50%); transform: translateY(-50%); } /* Use gaps to change how far down text is on the page */ .gaptiny{margin-top:10%;} .gapsmall{margin-top:20%;} .gapmedium{margin-top:50%;} .gaplarge{margin-top:100%;} /* Disable hyphenation. Useful for headers, etc.*/ .nohyphen { adobe-hyphenate: none; -webkit-hyphens: none; -moz-hyphens: none; -ms-hyphens: none; -epub-hyphens: none; hyphens: none; } /* Tables. Centers text, adds some space between columns and rows. */ table, th, td { padding: 5px 0; } table.center { border-collapse: separate; border-spacing: 25px 0; margin-top: 1em; margin-bottom: 1em; margin-left: auto; margin-right: auto; font-style:italic; } /*Prevent sub- and superscript from affecting line-height. Sub- and superscript will affect line-height if you just use their dedicated keyword for vertical-align. By decreasing line-height to the minimum value Kindle supports (i.e. 1.2) and using % for vertical-align, we solve this problem and can vertically-align sub- and superscript more accurately. */ sub { font-size: 0.675em; line-height: 1.2; vertical-align: sub; vertical-align: -20%; } sup { font-variant: normal; font-size: 0.675em; line-height: 0; position: relative; } /* Changes the font of the chapter title */ .chapter{ font-family: ; font-style: normal; font-size: 2.5em; text-align:; } /* Afterword author name */ .signature {text-align:right;margin-top:1em;} /* Letters, etc. */ .letter {margin-left: 3em; margin-right: 3em; } .letter p{text-align: justify; font-size: 1em;} .letter p.sign {text-align: right;margin-top:1em;} /* Poetry, etc. */ .stanza { margin-top: 1em; margin-right: 0; margin-bottom: 1em; margin-left: 2em; text-align: left; page-break-inside: avoid; } .stanza p { padding-left: 2em; text-indent: 0em; } .alignleft{text-align:left;} .alignright{text-align:right;} .aligncenter{text-align:center;} /* Little separator diamond
❖
*/ .separator { text-align: center; font-size: 200%; text-indent: 0; margin: 5% auto 3%; } /* Chapter title */ .chtitle { font-variant: ; hyphens: none; adobe-text-layout: optimizeSpeed; /* For Nook */ adobe-hyphenate: none; -webkit-hyphens: none; -moz-hyphens: none; -epub-hyphens: none; break-after: avoid; page-break-after: avoid; break-inside: avoid; page-break-inside: avoid; text-align: center; margin-top: 2em; margin-right: 0; margin-bottom: 2em; margin-left: 0; } /* Chapter sub-parts */ .part { text-align: center; text-indent: 0; font-size: 1.5em; margin: 5% auto 3%; } /** For the book title.xhtml. */ body.title h1{font-size:1.5em;} body.title h1 span.series{font-size:1.8em;} body.title h2{font-size:1.5em;} span.jp_text{font-weight:normal;} /* Used to force page breaks on images */ .pbbefore {page-break-before: always;} .pbafter {page-break-after: always;} span.dropcap { font-size: 1.75em; } .noindent { text-indent: 0em; } /* Blood strikethrough */ .strike{ color:red; text-decoration:line-through; } h2,h3,hgroup { font-variant: ; hyphens: none; adobe-text-layout: optimizeSpeed; /* For Nook */ adobe-hyphenate: none; -webkit-hyphens: none; -moz-hyphens: none; -epub-hyphens: none; break-after: avoid; page-break-after: avoid; break-inside: avoid; page-break-inside: avoid; text-align: center; margin-top: 2em; margin-right: 0; margin-bottom: 2em; margin-left: 0; } hgroup > * { font-weight: normal; margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; } hgroup > .first-child,hgroup > :first-child { font-weight: bold; } hgroup + p,p:first-child { hanging-punctuation: first last; text-indent: 0; } strong { font-variant: small-caps; font-weight: normal; } i > i { font-style: normal; } .fn_ref { vertical-align: super; font-size: 0.7em; line-height: 100% !important; } .footnote { text-indent: 0em; font-size: 0.675em; line-height: 0; vertical-align: super; vertical-align: 35%; } .footnote1 { text-indent: 0em; font-size: 0.7em; page-break-before: always; } /* Invert images in dark mode. RMSDK requires a target media as well as a state. */ @media all and (prefers-color-scheme: dark) { } /* For legacy reading systems */ section { display: block; } /* Epub2 compatibility CSS */ /* Give PNGs a white background for night mode compatibility... */ /* Except our house PNGs, which were rendered from SVGs with a white stroke... */ /* Or if the device supports prefers-color-scheme. We’ll invert the image in core.css. RMSDK requires a target media as well as a state. */ @media all and (prefers-color-scheme) { } /* Vertical align any MathML images we might have */ /* As of 2020-09 hanging punctuation only works on iBooks. However, when it hangs over the page margin, it's not rendered. So here we simply remove it for iBooks, unless it's on an element that already has a margin like*/ /* Full-page epigraphs */ section[epub|type~="epigraph"]{ text-align: center; } section[epub|type~="epigraph"] > *{ display: inline-block; margin: auto; margin-top: 3em; max-width: 80%; text-align: initial; } @supports(display: flex){ section[epub|type~="epigraph"]{ align-items: center; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; min-height: calc(98vh - 3em); padding-top: 3em; } section[epub|type~="epigraph"] > *{ margin: 0; } section[epub|type~="epigraph"] > * + *{ margin-top: 3em; } } /* End full-page epigraphs */ /* Display fractions more naturally if OpenType supports it, otherwise default to diagonal-fractions setting */ .fraction { font-feature-settings: frac; /* Low-level OT setting for all browsers */ } @supports (font-variant-numeric: diagonal-fractions) { .fraction { font-feature-settings: normal; /* Reset the low level, then... */ font-variant-numeric: diagonal-fractions; /* ... use the fallback code */ } }