// WHAT IS THIS? // This is typography for the Electric Book Classic theme (http://electricbook.io). // It is built with Sass. (See http://sass-lang.com, and http://jekyllrb.com/docs/assets for how Jekyll implements Sass.) // Jekyll will compile the finished CSS for your books in _site/_themes/classic/css. // // HOW TO USE IT // // Edit the default variables below. // Comment/uncomment or add font imports below. // Add your own custom CSS at the bottom. // First, let's set character encoding. Don't change this. @charset "utf-8"; // ------------- // Set variables // ------------- // Edition suffix: identifies this edition in page-fitting classes (in _print-fitting.scss). // For instance, a .tighten class in HTML might apply to your bookshop edition, but not the schools edition. // A suffix '-schools-edn' would mean only tags with that suffix would apply to that edition, e.g. {:.tighten-schools-edn} // If you're only planning one edition and use default tags ({:.tighten} not {:.tighten-schools-edn}), leave as null. $edition-suffix: null !default; // First, we set several variables related to overall page setup. $page-size: 129mm 198mm !default; // Width, then height. 129×198 is B-format (Lightning Source compatible) $margin-top: 15mm !default; $margin-bottom: 20mm !default; $margin-outside: 13mm !default; $margin-inside: 19mm !default; $bleed: 0 !default; $trim: 0 !default; $crop-marks: none !default; // crop | none // PDF file setup options $black-ink: true !default; // true or rich (true for pure black or rich for rich black) // We name font variables for two categories: // - 'text' fonts are used for body text and some page features; // - 'display' fonts are used for headings and similar short-string features. // For each category, we set a main font and a secondary font, allowing up to four fonts. // Finally, we set a fifth, monospace font for elements like computer code. $font-text-main: "Crimson", serif !default; $font-text-secondary: "Source Sans Pro", sans-serif !default; $font-display-main: "Source Sans Pro", sans-serif !default; $font-display-secondary: "Crimson", serif !default; $font-code: "Inconsolata", monospace !default; // Finally, we set variables related to text flow. $font-size-default: 11pt !default; $line-height-default: 15pt !default; // Set in points. For consistent baselines, all other line heights and vertical spaces are based on this. $text-align: left !default; $orphans: 1 !default; // Minimum number of lines that must be left at the bottom of the first page $widows: 1 !default; // Minimum number of lines that must be left at the top of the second page $letter-spacing-text: 0em !default; // Default letter-spacing for p, ul, ol, dl. Set in ems, e.g. 0.01em for 10/1000s of an em. // Hyphenation // Variables here apply to p, ul, ol, dl $hyphenation: auto !default; // Can be auto, none, or manual (only breaks on hyphens and soft hyphens) $hyphenation-dictionary: "" !default; // File name of dictionary in css/dictionaries. Overrides PrinceXML built-in hyphenation. $hyphenate-after: 3 !default; /* Minimum letters on new line after hyphen */ $hyphenate-before: 3 !default; /* Minimum letters at end of line before hyphen */ $hyphenate-lines: 1 !default; /* Maximum number of consecutive lines ending with hyphens */ // Should chapters start on a right-hand page (recto) or on any page? // This setting applies to the frontmatter, dedication-page, epigraph-page and chapter page styles. // (The halftitle-page, title-page and contents-page page styles always start on a recto.) $start-on: right !default; // right or auto or left () // Set the default start-depth of pages. // This is the distance from the top of the page to the first element on the first page. // Set it in multiples of $line-height-default to preserve your baseline grid. $start-depth: $line-height-default * 6 !default; // Style of page numbers on frontmatter pages // Remember to tag links to front matter pages in your TOC with {:.frontmatter-reference} $frontmatter-reference-style: lower-roman !default; // lower-roman, decimal, see http://www.princexml.com/doc/gen-content/#idp54010640 // Set the content of headers and footers. // // For no content: normal // For a page number: counter(page) // For the last h1 (increment to h2, h3, h4, h5, h6 as needed): string(h1-text, last) // Instead of last (last on page) you can also use first (first on page) or start (string set on previous page). // For the title attribute of the last h1 (increment to h2, h3, h4, h5, h6 as needed): string(h1-title, last) // (Note: if you use title attributes, you must add them for every heading at the heading-level you choose.) // For the book title, subtitle or author set with .title-page-title, .title-page-subtitle and .title-page-author: book-title, book-subtitle, book-author // For a phrase: "Any phrase in quotes" // For an em space: "\2003" // For other special characters, see CSS (ISO) at https://brajeshwar.github.io/entities/ // Verso (left-hand-page) $verso-top: string(h1-text, last) !default; $verso-top-left: normal !default; $verso-top-right: normal !default; $verso-top-left-corner: normal !default; $verso-top-right-corner: normal !default; $verso-bottom: counter(page) !default; $verso-bottom-left: normal !default; $verso-bottom-right: normal !default; $verso-bottom-left-corner: normal !default; $verso-bottom-right-corner: normal !default; // Recto (right-hand-page) $recto-top: string(h2-text, last) !default; $recto-top-left: normal !default; $recto-top-right: normal !default; $recto-top-left-corner: normal !default; $recto-top-right-corner: normal !default; $recto-bottom: counter(page) !default; $recto-bottom-left: normal !default; $recto-bottom-right: normal !default; $recto-bottom-left-corner: normal !default; $recto-bottom-right-corner: normal !default; // Verso (left-hand-page) for .frontmatter pages (`style: frontmatter`) $verso-top-frontmatter: normal !default; $verso-top-left-frontmatter: normal !default; $verso-top-right-frontmatter: normal !default; $verso-top-left-corner-frontmatter: normal !default; $verso-top-right-corner-frontmatter: normal !default; $verso-bottom-frontmatter: counter(page, $frontmatter-reference-style) !default; $verso-bottom-left-frontmatter: normal !default; $verso-bottom-right-frontmatter: normal !default; $verso-bottom-left-corner-frontmatter: normal !default; $verso-bottom-right-corner-frontmatter: normal !default; // Recto (right-hand-page) for .frontmatter pages (`style: frontmatter`) $recto-top-frontmatter: normal !default; $recto-top-left-frontmatter: normal !default; $recto-top-right-frontmatter: normal !default; $recto-top-left-corner-frontmatter: normal !default; $recto-top-right-corner-frontmatter: normal !default; $recto-bottom-frontmatter: counter(page, $frontmatter-reference-style) !default; $recto-bottom-left-frontmatter: normal !default; $recto-bottom-right-frontmatter: normal !default; $recto-bottom-left-corner-frontmatter: normal !default; $recto-bottom-right-corner-frontmatter: normal !default; // Special highlights for temporary debugging/viewing: // Specify a colour for highlighting; use 'inherit' for none. $highlight-tightened: inherit !default; $highlight-loosened: inherit !default; // ------------------------------------------------------------- // Import font files (@font-face) for fonts you specify // You may need to add the actual font files to `css/fonts` // Download locations for each noted in the end-of-line comments // ------------------------------------------------------------- // @import "classic/css/_sass/partials/fonts/adobe-caslon-pro"; // Proprietary: https://typekit.com/fonts/adobe-caslon-pro // @import "classic/css/_sass/partials/fonts/crimson-text"; // Open: https://www.google.com/fonts/specimen/Crimson+Text // @import "classic/css/_sass/partials/fonts/crimson"; // Open: https://github.com/skosch/Crimson // @import "classic/css/_sass/partials/fonts/inconsolata"; // Open: https://www.google.com/fonts/specimen/Inconsolata // @import "classic/css/_sass/partials/fonts/kalam"; // Open: https://www.google.com/fonts/specimen/Kalam // @import "classic/css/_sass/partials/fonts/linux-biolinum"; // Open: http://www.linuxlibertine.org/ // @import "classic/css/_sass/partials/fonts/linux-libertine"; // Open: http://www.linuxlibertine.org/ // @import "classic/css/_sass/partials/fonts/montserrat"; // Open: https://www.google.com/fonts/specimen/Montserrat // @import "classic/css/_sass/partials/fonts/overpass"; // Open: https://github.com/RedHatBrand/overpass // @import "classic/css/_sass/partials/fonts/source-sans-pro"; // Open: https://www.google.com/fonts/specimen/Source+Sans+Pro // @import "classic/css/_sass/partials/fonts/trajan-pro"; // Proprietary: https://typekit.com/fonts/trajan-pro-3 // @import "classic/css/_sass/partials/fonts/cormorant-garamond"; // Open: https://www.google.com/fonts/specimen/Cormorant+Garamond // @import "classic/css/_sass/partials/fonts/libre-baskerville"; // Open: https://fonts.google.com/specimen/Libre+Baskerville // @import "classic/css/_sass/partials/fonts/roboto"; // Open: https://fonts.google.com/specimen/Roboto // @import "classic/css/_sass/partials/fonts/oswald"; // Open: https://fonts.google.com/specimen/Oswald // --------------------- // Import theme partials // --------------------- @import "partials/hide-footer"; @import "partials/hide-nav-bar"; // -------------------------------------------- // Page setup and control, avoid changing these // -------------------------------------------- @import "partials/print-pdf-view"; // Sets the default initial view on PDFs @import "partials/print-page-setup"; // Sets up the page from your variables @import "partials/print-page-break-tools"; // Provides classes for semantic page breaks @import "partials/print-hide-non-printing"; // Hides anything .non-printing @import "partials/print-hide-video"; // Hides video from print output @import "partials/print-fitting"; // Classes for floating, tracking, shrinking, etc. @import "partials/print-hyphenation"; // Sets hyphenation dictionary // --------------------- // Classic-theme modules // --------------------- @import "partials/print-start-on-recto-or-verso"; // Starts chapters on a left- or right-hand-page @import "partials/print-page-start-depth"; // Sets a top margin on opening pages @import "partials/print-base-typography"; // Default typography for HTML elements @import "partials/print-verse"; // Default typography for verse, poetry, lyrics @import "partials/print-bibliographies"; @import "partials/print-epigraphs"; // @import "partials/print-dedications"; // @import "partials/print-definition-lists"; // Including .glossary @import "partials/print-pullquotes"; // Supports .pullquote @import "partials/print-boxes"; // @import "partials/print-code"; // For computer code and preformatted text @import "partials/print-tables"; // @import "partials/print-figures"; // @import "partials/print-notes"; // Footnotes, endnotes, sidenotes @import "partials/print-title-pages"; // Half-title and title pages @import "partials/print-copyright-page"; // @import "partials/print-toc"; // Tables of contents @import "partials/print-front-cover"; // Front-cover image for PDF ebooks @import "partials/print-smallcaps"; // @import "partials/print-maths"; // @import "partials/print-valedictions"; // @import "partials/print-quotations"; // @import "partials/print-openers"; // @import "partials/print-index"; // @import "partials/print-reset-sequences"; // Resets p indents, margins after other elements. Must be last @import in list. @import "partials/print-page-headers-footers-content"; // Sets content for headers and footers @import "partials/print-page-headers-footers-style"; // Sets styling for headers and footers