Last active
April 20, 2017 14:54
-
-
Save rootl/2e000e950441fc2255f081c80700b73c to your computer and use it in GitHub Desktop.
Pressbooks PDF Export Custom CSS Example 2 (book site reference: "milnepublishing.geneseo.edu/concise-introduction-to-logic")
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Theme Name: Luther PDF | |
Theme URI: http://pressbooks.com/ | |
Description: Named after Martin Luther, this is a traditional book theme, good for novels, and text-heavy non-fiction. An earlier version of this theme was commissioned by Fortress Press / Augsburg Fortress. | |
Author: Pressbooks (Book Oven Inc.) | |
Author URI: http://pressbooks.com | |
Copyright 2011-2015 Book Oven Inc. (Pressbooks.com) code@pressbooks.com | |
Version: 1.4 | |
*/ | |
/* | |
Custom css: Allison Brown, Digital Publishing Services Manager, Milne Library, SUNY Geneseo; Except interactive and iframe css: Leah M Root, Web Services Developer, Milne Library, SUNY Geneseo | |
*/ | |
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,600italic,700,700italic,800,800italic); | |
.symbol { | |
font-family: "FreeSans"; | |
} | |
/******************** | |
DeLancey custom Styles | |
*********************/ | |
.marg-left{margin-left:45pt;} | |
.sub{vertical-align:sub;font-size: 60%;} | |
.em{font-style:italic;} | |
.strong{font-weight:bold;} | |
.underline{text-decoration:underline;} | |
.green{background-color:#ccffcc;} | |
.center{text-align:center;} | |
.super{vertical-align:super;font-size: 60%;} | |
.table { | |
padding:0pt 5.8pt 0pt 5.8pt; | |
vertical-align:top; | |
border: .5pt solid #000000 | |
} | |
ol.lower-alpha { | |
list-style-type: lower-latin!important; | |
margin-left: 20px; | |
} | |
.ql-left-eqno { | |
width: 0 !important; | |
text-align: left !important; | |
display: none !important; | |
} | |
.ql-right-eqno { | |
width: 0 !important; | |
text-align: left !important; | |
display: none !important; | |
} | |
.ql-left-displayed-equation { | |
text-align: left !important; | |
white-space: normal; | |
overflow: visible; | |
} | |
.ql-img-displayed-equation { | |
background: none !important; | |
border: none !important; | |
padding: 0px !important; | |
margin: 3px !important; | |
vertical-align: top; | |
display: block !important; | |
} | |
.indent { | |
margin-left: 45pt; | |
} | |
.border-right { | |
border-bottom: 1px solid #000; | |
border-top: 1px solid #000!important; | |
border-left: 1px solid #000; | |
border-right: 3px solid #000; | |
} | |
.border-bottom { | |
border-top: 1px solid #000!important; | |
border-left: 1px solid #000; | |
border-bottom: 5px solid #000!important; | |
} | |
tr.border-bottom td th{ | |
border-top: 1px solid #000!important; | |
border-left: 1px solid #000; | |
border-bottom: 5px solid #000!important; | |
} | |
.border { | |
border: 1px solid #000; | |
} | |
.textbox { | |
/* width: 100%;*/ | |
padding: 2% 3%; | |
margin-bottom: 15px; | |
border-radius: 4px; | |
border: none; | |
} | |
.textbox h3:first-child{ | |
text-align: center; | |
margin: -2% -2% 15px; | |
color: #ffffff; | |
padding: 15px 0 15px; | |
} | |
.textbox ul li::before{ | |
content:none; | |
counter-increment: none; | |
} | |
.textbox ul{ | |
text-indent: 0px; | |
} | |
.textbox h3 + p { | |
margin-top: 10px; | |
} | |
.learning-objectives { | |
background-color: #f7f7f9; | |
} | |
.textbox.learning-objectives h3{ | |
background-color: #111111; | |
} | |
.key-takeaways{ | |
background-color: #eaf5ea; | |
} | |
.textbox.key-takeaways h3{ | |
background-color: #3a7a33; | |
} | |
.exercises { | |
background-color: #e3eff6; | |
} | |
.textbox.exercises h3{ | |
background-color: #0b6396; | |
} | |
.examples { | |
background-color: #f3e1e3; | |
} | |
.textbox.examples h3{ | |
background-color: #7a333a; | |
} | |
.textbox ol { | |
list-style-position: outside; | |
margin-left: 30px; | |
text-indent: -20px; | |
margin: 0 0 5px 20px; | |
} | |
.chapter-title-wrap { | |
font-size: 1.5em; | |
line-height: 1.8em; | |
text-align: center; | |
} | |
.part-title-wrap { | |
font-size: 2em; | |
text-align: center; | |
} | |
/* | |
div.front-matter + div.part { | |
counter-reset: page 1; | |
} | |
Reset front matter page numbers test 10-14 APB*/ | |
.bcc-box li::before{ | |
content:none; | |
counter-increment: none; | |
} | |
.bcc-box ol { | |
display: block; | |
list-style-type: decimal; | |
list-style-position: outside !important; | |
margin: 0 0 5px 30px; | |
font-family:"Cardo", "FreeSerif", "Hoefler Text", "Times New Roman", serif; | |
font-size:1em; | |
} | |
div.rotate { | |
/* float: prince-top-if-necessary; */ | |
margin-left: -14.5%; | |
width: 129%; | |
page-break-inside:auto!important; | |
} | |
div.keep { | |
display:block!important; | |
page-break-inside: avoid; | |
} | |
table ul { | |
margin-left: 20px; | |
margin-bottom: 3px; | |
} | |
table { | |
font-size: small; | |
page-break-inside: avoid; | |
page-break-before: auto; | |
} | |
table p { | |
margin: 0px; | |
font-size: small; | |
margin-bottom: 3px; | |
} | |
table p.no-indent { | |
margin-bottom: 3px; | |
} | |
ul li { | |
font-family:"Cardo", "FreeSerif", "Hoefler Text", "Times New Roman", serif; | |
font-size:1em; | |
margin-bottom: 5px; | |
} | |
ol li { | |
margin-bottom: 5px; | |
} | |
p { | |
font-family:"Cardo", "FreeSerif", "Hoefler Text", "Times New Roman", serif; | |
font-size:1em; | |
font-style:normal; | |
font-variant:normal; | |
font-weight:normal; | |
line-height:1.4; | |
margin-bottom:15px; | |
text-align:left; | |
text-decoration:none; | |
text-indent:0px; | |
widows:2; | |
orphans:2; | |
-webkit-hyphenate-before:3; | |
hyphenate-before:3; | |
-webkit-hyphenate-after:3; | |
hyphenate-after:3; | |
-webkit-hyphenate-lines:2; | |
hyphenate-lines:2; | |
} | |
/*__INSERT_PDF_HOUSE_STYLE__*/ | |
div.blockquote, | |
blockquote { | |
margin-left: 20px; | |
margin-right: 20px; | |
font-family:"Cardo", "FreeSerif", "Hoefler Text", "Times New Roman", serif; | |
font-size:1em; | |
} | |
h1 { | |
page-break-after:avoid; | |
font-family:"Open Sans","LiberationSans", Candara,"Trebuchet MS", Verdana, sans-serif; | |
font-size:1.25em; | |
font-style:normal; | |
font-variant:normal; | |
font-weight: 700; | |
margin-top:12px; | |
margin-left:0px; | |
margin-right:0px; | |
text-align: center; | |
text-decoration:none; | |
text-indent:0px; | |
} | |
h2 { | |
page-break-after:avoid; | |
font-family:"Open Sans", "LiberationSans", Candara,"Trebuchet MS", Verdana, sans-serif; | |
font-size:1em; | |
font-weight: 700; | |
margin-top:9px; | |
margin-left:0px; | |
margin-right:0px; | |
text-decoration:none; | |
text-indent:0px; | |
} | |
h3 { | |
page-break-after:avoid; | |
font-family:"Open Sans", Candara,"LiberationSans", "Trebuchet MS", Verdana, sans-serif; | |
font-size: 0.87em; | |
font-weight: 700; | |
margin-top:9px; | |
margin-left:0px; | |
margin-right:0px; | |
text-align: left; | |
text-decoration:none; | |
} | |
h4 { | |
page-break-after:avoid; | |
font-family:"Open Sans", Candara,"LiberationSans", "Trebuchet MS", Verdana, sans-serif; | |
font-size:0.75em; | |
font-style: italic; | |
margin-top:9px; | |
margin-left:0px; | |
margin-right:0px; | |
text-align:left; | |
text-decoration:none; | |
} | |
div.__UNKNOWN__ h1 { | |
font-weight: 600; | |
} | |
div.__UNKNOWN__ h2 { | |
text-align:left!important; | |
font-weight: 600; | |
} | |
div.__UNKNOWN__ h3 { | |
text-align:left!important; | |
text-indent:2em; | |
font-weight: 600; | |
} | |
div.__UNKNOWN__ h4 { | |
text-align:left!important; | |
text-indent:2em; | |
font-weight: 600; | |
} | |
h5 { | |
font-family:"Cardo", "FreeSerif", "Hoefler Text", "Times New Roman", serif; | |
font-size: 1em; | |
line-height:1.167; | |
margin-top:9px; | |
margin-bottom:9px; | |
text-align:center; | |
} | |
.bcc-box{ | |
/* width: 100%;*/ | |
padding: 2% 3%; | |
margin-bottom: 15px; | |
margin-top: 15px; | |
border-radius: 4px; | |
} | |
.bcc-box h3:first-child { | |
text-align: center!important; | |
text-indent: 0em; | |
margin: -2% -3% 15px; | |
color: #ffffff; | |
padding: 15px 0 15px; | |
} | |
.bcc-highlight { | |
background-color: #f7f7f9; | |
} | |
.bcc-box.bcc-highlight h3 { | |
background-color: #111111; | |
} | |
.bcc-success { | |
background-color: #eaf5ea; | |
} | |
.bcc-box.bcc-success h3{ | |
background-color: #3a7a33; | |
} | |
.bcc-info{ | |
background-color: #e3eff6; | |
} | |
.bcc-box.bcc-info h3{ | |
background-color: #0b6396; | |
} | |
/* FONTS | |
=========== */ | |
@font-face { | |
font-family: "FreeSans"; | |
font-style: normal; | |
src: url(../usr/share/fonts/freefont-20090104/FreeSans.otf) format("opentype"); | |
} | |
@font-face { | |
font-family: "FreeSerif"; | |
font-style: normal; | |
src: url(../usr/share/fonts/FreeSerif.ttf) format("opentype"); | |
} | |
@font-face { | |
font-family: "FreeSerif"; | |
font-weight: bold; | |
src: url(../usr/share/fonts/FreeSerifBold.otf) format("opentype"); | |
} | |
@font-face { | |
font-family: "FreeSerif"; | |
font-style: italic; | |
src: url(../usr/share/fonts/freefont-20080912/FreeSerifItalic.otf) format("opentype"); | |
} | |
@font-face { | |
font-family: "FreeSerif"; | |
font-style: italic; | |
font-weight: bold; | |
src: url(../usr/share/fonts/freefont-20120503/FreeSerifBoldItalic.otf) format("opentype"); | |
} | |
@font-face{ | |
font-family: "Open Sans"; | |
font-style: normal; | |
src: url(https://fonts.googleapis.com/css?family=Open+Sans); | |
} | |
@font-face { | |
font-family: 'Open Sans'; | |
font-style: normal; | |
font-weight: 700; | |
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzBdwxCXfZpKo5kWAx_74bHs.woff2) format('woff2'); | |
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; | |
} | |
@font-face { | |
font-family: 'Open Sans'; | |
font-style: italic; | |
font-weight: 400; | |
src: local('Open Sans Italic'), local('OpenSans-Italic'), url(https://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBvZraR2Tg8w2lzm7kLNL0-w.woff2) format('woff2'); | |
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; | |
} | |
@font-face { | |
font-family: "LiberationSans"; | |
font-style: normal; | |
src: url(https://milnepublishing.geneseo.edu/wp-content/plugins/pressbooks/themes-book/pressbooks-book/liberation-fonts-ttf-2.00.1/LiberationSans-Italic.ttf) format("truetype"); | |
} | |
@font-face { | |
font-family: "LiberationSans"; | |
font-weight: 600; | |
font-style: normal; | |
src: url(https://milnepublishing.geneseo.edu/wp-content/plugins/pressbooks/themes-book/pressbooks-book/liberation-fonts-ttf-2.00.1/LiberationSans-Bold.ttf) format("truetype"); | |
} | |
@font-face { | |
font-family: "Cardo"; | |
font-weight: bold; | |
font-style: normal; | |
src: url(https://milnepublishing.geneseo.edu/wp-content/plugins/pressbooks/themes-book/pressbooks-book/export/prince/../../fonts/Cardob101.ttf) format("truetype"); | |
} | |
@font-face { | |
font-family: "Cardo"; | |
font-weight: normal; | |
font-style: italic; | |
src: url(https://milnepublishing.geneseo.edu/wp-content/plugins/pressbooks/themes-book/pressbooks-book/export/prince/../../fonts/Cardoi99.ttf) format("truetype"); | |
} | |
@font-face { | |
font-family: "Cardo"; | |
font-weight: normal; | |
font-style: normal; | |
src: url(https://milnepublishing.geneseo.edu/wp-content/plugins/pressbooks/themes-book/pressbooks-book/export/prince/../../fonts/Cardo104s.ttf) format("truetype"); | |
} | |
/* Override hierarchy. See: http://www.princexml.com/doc/8.1/pdf-bookmarks */ | |
h1, h2, h3, h4, h5, h6 { | |
prince-bookmark-level: 1; | |
} | |
/* Page */ | |
@page { | |
margin-top: 6em; | |
margin-bottom: 6em; | |
orphans:3; | |
widows:3; | |
} | |
@page :left { | |
margin-left: 8em; | |
margin-right: 8em; | |
} | |
@page :right { | |
margin-left: 8em; | |
margin-right: 8em; | |
} | |
/* TOC */ | |
@page toc { | |
@bottom { | |
content:""; | |
vertical-align: center; | |
} | |
} | |
@page toc:blank { | |
@bottom { | |
content: ""; | |
} | |
} | |
/* Front-Matter */ | |
@page front-matter:left { | |
@top-left { | |
content: ""; | |
} | |
@bottom { | |
content: counter(page, lower-roman); | |
font-family: "Cardo", "FreeSerif", "Hoefler Text", "Times New Roman", serif; | |
vertical-align: center; | |
} | |
} | |
@page front-matter:right { | |
@top-right { | |
content: ""; | |
} | |
@bottom { | |
content: counter(page, lower-roman); | |
font-family: "Cardo", "FreeSerif", "Hoefler Text", "Times New Roman", serif; | |
vertical-align: center; | |
} | |
} | |
@page front-matter:first { | |
@top-right { | |
content: ""; | |
} | |
@bottom { | |
content: counter(page, lower-roman); | |
font-family: "Cardo", "FreeSerif", "Hoefler Text", "Times New Roman", serif; | |
vertical-align: center; | |
page-break-after: right; | |
} | |
} | |
@page front-matter:blank { | |
@top-left { | |
content: ""; | |
} | |
@bottom { | |
content: ""; | |
} | |
} | |
/* Dedication, Epigraph & Before Title */ | |
@page dedication, | |
epigraph, | |
before-title { | |
@bottom { | |
content:""; | |
} | |
} | |
@page dedication:blank { | |
@bottom { | |
content:""; | |
} | |
} | |
/* Introduction */ | |
@page introduction:left { | |
@top-left { | |
content: ""; | |
} | |
@bottom { | |
content: counter(page); | |
font-family: "Cardo", "FreeSerif", "Hoefler Text", "Times New Roman", serif; | |
vertical-align: center; | |
} | |
} | |
/*counter(page) "\A0\A0\A0" string(book-title) Removed from Intro Page Left*/ | |
@page introduction:right { | |
@top-right { | |
content: ""; | |
} | |
@bottom { | |
content: counter(page); | |
font-family: "Cardo", "FreeSerif", "Hoefler Text", "Times New Roman", serif; | |
vertical-align: center; | |
} | |
} | |
@page introduction:first { | |
@top-left { | |
content: ""; | |
} | |
@top-right { | |
content: ""; | |
} | |
@bottom { | |
content: counter(page); | |
font-family: "Cardo", "FreeSerif", "Hoefler Text", "Times New Roman", serif; | |
vertical-align: center; | |
} | |
} | |
@page introduction:blank { | |
@top-left { | |
content: ""; | |
} | |
@bottom { | |
content: ""; | |
} | |
} | |
@page abstracts { | |
@top-left { | |
content: ""; | |
} | |
@bottom { | |
content: ""; | |
} | |
} | |
/* Part */ | |
div.part:first { | |
page: part; | |
counter-reset: page 1!important; | |
} | |
@page part { | |
vertical-align: middle; | |
page-break-before: right; | |
} | |
/* Chapter */ | |
@page chapter:left { | |
@top-left { | |
font-family: "Cardo", "FreeSerif", "Hoefler Text", "Times New Roman", serif; | |
content: counter(page) "\A0\A0\A0" string(book-title); | |
vertical-align: left; | |
} | |
} | |
@page chapter:right | |
{ | |
@top-right | |
{ | |
font-family: "Cardo", "FreeSerif", "Hoefler Text", "Times New Roman", serif; | |
content: string(section-title, last) "\A0\A0\A0" counter(page); | |
vertical-align: right; | |
} | |
} | |
@page chapter:first { | |
@top-left { | |
content: ""; | |
} | |
@top-right { | |
content: ""; | |
} | |
@bottom { | |
content: counter(page); | |
font-family: "Cardo", "FreeSerif", "Hoefler Text", "Times New Roman", serif; | |
vertical-align: center; | |
} | |
} | |
@page chapter:blank { | |
@top-left { | |
content: ""; | |
} | |
} | |
/* Footnotes */ | |
@page { | |
@footnotes { | |
padding-top: 1em; | |
} | |
} | |
/* Back-matter */ | |
@page back-matter:left { | |
@top-left { | |
font-family: "Cardo", "FreeSerif", "Hoefler Text", "Times New Roman", serif; | |
content: counter(page) "\A0\A0\A0" string(book-title); | |
vertical-align: left; | |
} | |
} | |
@page back-matter:right { | |
@top-right | |
{ | |
font-family: "Cardo", "FreeSerif", "Hoefler Text", "Times New Roman", serif; | |
content: string(section-title, last) "\A0\A0\A0" counter(page); | |
vertical-align: right; | |
} | |
} | |
@page back-matter:first { | |
@top-left { | |
content: ""; | |
} | |
@top-right { | |
content: ""; | |
} | |
@bottom | |
{ | |
content: counter(page); | |
font-family: "Cardo", "FreeSerif", "Hoefler Text", "Times New Roman", serif; vertical-align: center; | |
} | |
} | |
@page back-matter:blank { | |
@top-left { | |
content: ""; | |
} | |
} | |
#toc { | |
page: toc; | |
prince-page-group: start; | |
} | |
div.front-matter { | |
page: front-matter; | |
prince-page-group: start; | |
counter-reset: page 1; | |
} | |
div.front-matter.dedication { | |
page: dedication; | |
prince-page-group: start; | |
} | |
div.front-matter.epigraph { | |
page: epigraph; | |
prince-page-group: start; | |
} | |
div.front-matter.before-title { | |
page: before-title; | |
prince-page-group: start; | |
} | |
div.front-matter.introduction { | |
page: introduction; | |
page-break-before: right; | |
page-break-after: right; | |
} | |
div.front-matter.dedication { | |
page: dedication; | |
page-break-before: right; | |
page-break-after: right; | |
} | |
div.front-matter.abstracts { | |
page: abstracts; | |
page-break-before: right; | |
page-break-after: right; | |
} | |
div.chapter { | |
page: chapter; | |
prince-page-group: start; | |
} | |
div.back-matter { | |
page: back-matter; | |
prince-page-group: start; | |
} | |
div.part { | |
page-break-before: right; | |
} | |
/*APB reset counting at start of text, rather than intro*/ | |
div.part.invisible { | |
display: none; | |
} | |
body { | |
font: 11pt/1.1 "Cardo", "FreeSerif", "Hoefler Text", "Times New Roman", serif; | |
} | |
a { | |
border: none; | |
color: inherit; | |
text-decoration: none; | |
} | |
a.backlink { | |
text-decoration: underline!important; | |
} | |
p { | |
line-height: 1.2em; | |
text-align: justify; | |
} | |
.nonindent, | |
.no-indent { | |
text-indent: 0; | |
} | |
p + ul { | |
margin-top: 10px; | |
} | |
h1, h2, h3, h4, h5, h6 { | |
font-family:"Open Sans","LiberationSans", Candara,"Trebuchet MS", Verdana, sans-serif; | |
font-weight: normal; | |
text-align: center; | |
} | |
hr { | |
margin: 10px auto; | |
text-align: center; | |
width: 20%; | |
} | |
hr.break-symbols { | |
border: none; | |
font-size: 1.1em; | |
margin-bottom: 20px; | |
} | |
hr.break-symbols::after { | |
display: block; | |
content: "\066D"; | |
font-size: 1.8em; | |
text-align: center; | |
} | |
table { | |
display: table; | |
border-collapse: collapse; | |
max-width: 110%; | |
margin-left: auto; | |
margin-right: auto; | |
page-break-inside:auto!important; | |
table-layout: fixed; | |
} | |
tr { | |
page-break-after:auto; | |
} | |
th, td { | |
page-break-inside:auto!important; | |
border: 0.5px solid; | |
padding: 3px; | |
margin: 0px!important; | |
font-size: small; | |
text-indent: 0px; | |
min-width: 75px !important; | |
min-height: 25px; | |
} | |
dt { | |
float: left; | |
font-weight: bold; | |
margin-right: 5px; | |
margin-bottom: 0; | |
} | |
dd { | |
margin-bottom: 0; | |
} | |
ul ul, | |
ul ul ul { | |
list-style-type: none; | |
} | |
ul li li { | |
list-style-image: url(https://milnepublishing.geneseo.edu/steps-to-success/wp-content/plugins/pressbooks/themes-book/pressbooks-book/export/prince/images/em-dash.png); | |
} | |
ul li li li { | |
list-style-image: none; | |
} | |
ul li li li::before { | |
content: "\002A"; | |
font-size: 0.5em; | |
margin-right: 5px; | |
} | |
ol, li{ | |
margin-left: 10px; | |
margin-bottom: 5px; | |
font-family:"Cardo", "FreeSerif", "Hoefler Text", "Times New Roman", serif; | |
} | |
cite { | |
font-weight: normal; | |
} | |
.hanging-indent { | |
padding-left: 1em; | |
text-indent: -1em; | |
text-align: left; | |
} | |
/* HALFTITLE PAGE | |
==================== */ | |
#half-title-page h1.title:first-of-type { | |
string-set: book-title content(); | |
page-break-before: right; | |
page-break-after: right; | |
bookmark-level: none; | |
font-size: 2em; | |
margin-top: 10cm; | |
} | |
/* TITLE PAGE | |
================ */ | |
#title-page { | |
page-break-before: right; | |
page-break-after: left; | |
height: 100%; | |
} | |
#title-page > .subtitle, | |
#title-page > div.logo, | |
#title-page > .author, | |
#title-page > .publisher, | |
#title-page > .publisher-city { | |
bookmark-level: none; | |
} | |
#title-page > .title { | |
font-size: 2.5em; | |
margin-top: 2cm; | |
text-transform: none; | |
} | |
#title-page > .subtitle { | |
font-size: 2em; | |
margin-top: 1.5cm; | |
text-transform: none; | |
} | |
#title-page > div.logo { | |
margin-top: 2cm; | |
height: 26px; | |
background-repeat: no-repeat; | |
background-position: bottom center; | |
} | |
#title-page .title + div.logo { | |
margin-top: 4cm; | |
} | |
#title-page > .author { | |
font-size: 1.5em; | |
margin-top: 1.5cm; | |
text-transform: none; | |
} | |
#title-page > .publisher { | |
font-size: 1.25em; | |
float: bottom; | |
margin-bottom: 0; | |
} | |
#title-page > .publisher-city { | |
font-size: 1em; | |
margin-top: 4cm; | |
} | |
#copyright-page { | |
page-break-before: always; | |
} | |
#copyright-page p { | |
font-size: 0.9em; | |
text-indent: 0; | |
margin-bottom: 0.5em; | |
} | |
#copyright-page > .ugc { | |
float: bottom; | |
} | |
/* DEDICATION | |
================ */ | |
.dedication p { | |
font-style: italic; | |
text-align: center; | |
} | |
/* TITLES | |
=================== */ | |
h3.front-matter-number, h3.part-number, h3.chapter-number, h3.back-matter-number { | |
bookmark-level: none; | |
} | |
div.ugc h1, div.ugc h2, div.ugc h3, div.ugc h4, div.ugc h5, div.ugc h6 { | |
bookmark-level: none; | |
margin-bottom: 5px; | |
page-break-after:avoid; | |
} | |
div.ugc h1 + p, | |
div.ugc h2 + p, | |
div.ugc h3 + p, | |
div.ugc h4 + p, | |
div.ugc h5 + p { | |
margin-top: 10px; | |
margin-bottom: 15px; | |
} | |
div.front-matter > div.ugc h6.short-title:first-of-type, | |
div.chapter > div.ugc h6.short-title:first-of-type, | |
div.back-matter > div.ugc h6.short-title:first-of-type { | |
string-set: section-title content() !important; /* override running header */ | |
visibility: hidden; /* display:none breaks string-set: */ | |
font-size: 0; | |
height: 0; | |
} | |
div.front-matter .front-matter-title-wrap > h1:first-of-type, | |
div.chapter .chapter-title-wrap > h2:first-of-type, | |
div.back-matter .back-matter-title-wrap > h1:first-of-type { | |
font-size: 1.5em; | |
string-set: section-title content(); | |
counter-reset: footnote; | |
margin-bottom: 20pt; | |
} | |
div.front-matter.preface .front-matter-title-wrap > h1:first-of-type, | |
#toc > h1:first-of-type { | |
font-size: 1.5em; | |
margin-top: 2cm; | |
margin-bottom: 2.5cm; | |
} | |
/* TABLE OF CONTENTS | |
======================= */ | |
.toc h1 { | |
text-align: center | |
} | |
#toc a { | |
border: none; | |
} | |
#toc ul, #toc li { | |
list-style: none; | |
margin: 0; | |
padding: 0; | |
} | |
#toc li { | |
position: relative; | |
} | |
#toc a::after { | |
content: leader(' ') target-counter(attr(href), page); | |
font-style: normal; | |
position: absolute; | |
top: 0; | |
right: 0; | |
text-decoration: none; | |
} | |
#toc .front-matter a::after { | |
content: leader(' ') target-counter(attr(href), page, lower-roman); | |
} | |
#toc .introduction a::after { | |
content: leader(' ') target-counter(attr(href), page); | |
} | |
#toc .abstracts a::after { | |
content: ""; | |
} | |
#toc .part { | |
margin: .6cm 0 .4em; | |
text-align: center; | |
font-weight: bold; | |
page-break-after: avoid; | |
} | |
#toc { | |
page-break-before: right; | |
counter-reset: part; | |
font-size: 1em; | |
} | |
#toc ul { | |
counter-reset: chapter; | |
line-height: 1.2em; | |
} | |
#toc .chapter a, | |
#toc .front-matter a, | |
#toc .back-matter a { | |
padding-left: 25px; | |
} | |
#toc .chapter .section a::before, | |
#toc .front-matter .section a::before, | |
#toc .back-matter .section a::before { | |
content:''; | |
counter-increment: none; | |
} | |
#toc .chapter.numberless a::before { | |
content:'' ; | |
counter-increment: none; | |
margin-right: 0; | |
} | |
#toc .part a::after { | |
content:'' ; | |
} | |
#toc .chapter + .back-matter { | |
margin-top: 1.3em; | |
} | |
#toc span.chapter-author { | |
display: inline-block; | |
font-style: italic; | |
margin-left: 2em; | |
width: 90%; | |
} | |
#toc span.chapter-license, | |
#toc span.chapter-subtitle { | |
display: none; | |
} | |
#toc span.toc-chapter-title { | |
display: inline-block; | |
width: 90%; | |
} | |
#toc span.chapter-author, | |
#toc span.chapter-license, | |
#toc span.chapter-subtitle { | |
margin-bottom: 5px; | |
} | |
#toc span.chapter-subtitle + | |
span.chapter-author, | |
span.chapter-author + | |
span.chapter-license, | |
#toc span.chapter-subtitle + | |
span.chapter-license { | |
margin-bottom: 5px; | |
position: relative; | |
top: -5px; | |
} | |
#toc ul.sections { | |
display: none; | |
position: static !important; | |
width: 90%; | |
margin-bottom: 0.75em; | |
} | |
#toc li.section { | |
display:none; | |
position: static !important; | |
/*display: block;*/ | |
text-indent: 0; | |
padding-left: 0; | |
margin-left: 0; | |
} | |
li.section::before { | |
content: ""; | |
} | |
li.section a::after { | |
content: "" !important; | |
display: none; | |
} | |
/*end toc*/ | |
/* MOAR TRADITIONAL CSS | |
================== */ | |
div.part, div.front-matter, div.back-matter, div.chapter { | |
page-break-before: right; | |
} | |
div.part, div.chapter { | |
page-break-after: right; | |
} | |
.display-none, h3.front-matter-number, h3.back-matter-number { | |
display: none; | |
} | |
#introduction h1 h2 h3 { | |
page-break-after: avoid; | |
} | |
h3.part-number, h3.chapter-number { | |
display:none; / *hide auto part # */ | |
background-repeat: no-repeat; | |
background-position: bottom center; | |
padding-bottom: 1em; | |
text-transform: uppercase; | |
} | |
h3.chapter-number { | |
margin-bottom: 3em; | |
counter-increment: none; | |
} | |
div.chapter.numberless h3.chapter-number { | |
display: none; | |
} | |
.aphorism { | |
font-size: 1em; | |
font-style: italic; | |
margin: 0 auto 4em; | |
width: 50%; | |
} | |
.aphorism cite { | |
display: block; | |
font-size: 0.875em; | |
font-style: normal; | |
font-variant: small-caps; | |
text-align: right; | |
} | |
.aphorism cite::before { | |
content: "–"; | |
} | |
/* FOOTNOTES | |
* @see: http://www.princexml.com/doc/8.1/footnotes/ | |
================== */ | |
.footnote { | |
font-size: 0.75em; | |
display: none; | |
display: footnote; | |
display: prince-footnote; | |
position: footnote; | |
counter-increment: footnote; | |
footnote-style-position: inside; | |
margin-left: 0; | |
line-height: 1.4; | |
text-indent: 1em; | |
text-align: left; | |
} | |
sup.endnote { | |
line-height: 1em; | |
vertical-align: top; | |
} | |
/* ENDNOTES | |
================== */ | |
.endnotes hr { | |
border: none; | |
margin-top: 1cm; | |
} | |
.endnotes h3 { | |
margin-bottom: 0; | |
} | |
.endnotes ol { | |
font-size: 0.8em; | |
margin-top: 5px; | |
margin-left: 0; | |
} | |
.endnotes li { | |
text-indent: 22pt; | |
} | |
.endnotes p + p { | |
text-indent: 0; | |
} | |
/* CUT AND PASTE FROM EPUB FORTRESS.CSS | |
================== */ | |
.aside { | |
font-style: italic; | |
border-top: 1px solid #000; | |
border-bottom: 1px solid #000; | |
margin: 2em 10%; | |
padding: 10px 0; | |
text-indent: 0; | |
} | |
.textbox { | |
border: 1px solid #000; | |
margin: 10px 0; | |
padding: 10px; | |
} | |
.textbox.shaded { | |
background-color: #eee; | |
} | |
.textbox p { | |
margin-top: 0; | |
} | |
.textbox-caption { | |
display: block; | |
font-size: 0.9em; | |
font-weight: bold; | |
margin: 0; | |
} | |
h2.chapter-subtitle { | |
font-weight: normal; | |
font-style: italic; | |
text-align: center; | |
} | |
h2.chapter-author { | |
text-align: center; | |
font-weight: normal; | |
} | |
h2.entry-title { | |
text-align: center; | |
font-weight: normal; | |
text-indent: 0em; | |
} | |
h2.entry-title::before { | |
content:none!important; | |
counter-increment: none; | |
display:none!important; | |
} | |
h3.entry-title { | |
text-align: center; | |
font-weight: normal; | |
text-indent: 0em; | |
} | |
div.ugc h2.chapter-subtitle, | |
div.ugc h2.chapter-author { | |
font-size: 1.4em; | |
font-variant: normal; | |
margin: -1.4em 0 3em; | |
} | |
div.ugc h2.chapter-subtitle { | |
margin-bottom: 2.8em; | |
padding-top: 0.5em; | |
} | |
div.ugc h2.chapter-author { | |
font-size: 0.9em; | |
font-style: normal; | |
font-weight: normal; | |
} | |
.pullquote { | |
border: 1px solid #000; | |
border-width: 1px 0; | |
margin: 20px auto; | |
padding: 5px 0; | |
text-align: center; | |
width: 45%; | |
} | |
.pullquote-left { | |
border: 1px solid #000; | |
border-width: 1px 0; | |
float: left; | |
margin: 15px 15px 15px 0; | |
padding: 5px 0; | |
text-align: center; | |
width: 45%; | |
} | |
.pullquote-right { | |
border: 1px solid #000; | |
border-width: 1px 0; | |
float: right; | |
margin: 15px 0 15px 15px; | |
padding: 5px 0; | |
text-align: center; | |
width: 45%; | |
} | |
/* IMAGES | |
================== */ | |
img { | |
height: auto; | |
max-width: 100%!important; | |
background: none; | |
border: none; | |
padding: 5px; | |
} | |
.alignleft { | |
float: left; | |
margin: 1em 1em 1em 0; | |
} | |
.alignright { | |
float: right; | |
margin: 1em 0 1em 1em; | |
} | |
.aligncenter { | |
display: block; | |
margin: 1em auto; | |
text-align: center; | |
} | |
div.aligncenter { | |
display: block; | |
margin: 1em auto; | |
text-align: center; | |
max-width: 100%; | |
} | |
img.aligncenter { | |
display: block; | |
margin: 1em auto; | |
text-align: center; | |
} | |
.wp-caption { | |
float: prince-top-if-necessary; | |
height: auto; | |
max-width: 100%!important; | |
margin: 1em 0; | |
text-align: center; | |
font-style: italic; | |
} | |
.wp-caption-text { | |
font-size: 0.875em; | |
margin-top: 5px; | |
text-align: center; | |
font-style: italic; | |
} | |
/* BLOCKQUOTES | |
=============== */ | |
div.blockquote { | |
border-width: 0 4px; | |
margin-bottom: 2em; | |
} | |
p.bl_nonindent { | |
margin: 2em 10% 0; | |
text-indent: 0; | |
} | |
p.bl_indent { | |
margin: 0 10%; | |
text-indent: 1em; | |
} | |
/* BIBLIOGRAPHY | |
=============== */ | |
.bibliography p { | |
padding-left: 14pt; | |
text-indent: -14pt; | |
text-align: left; | |
} | |
/* INDEX | |
================== */ | |
.index .ugc { | |
column-count: 2; | |
column-gap: 2.5em; | |
text-align: left; | |
} | |
.index .ugc div { | |
margin-bottom: 4em; | |
} | |
.index .ugc p { | |
font-size: 0.9em; | |
padding-left: 14pt; | |
text-indent: -14pt; | |
text-align: left; | |
} | |
.index .ugc p.sub-entry { | |
padding-left:30px; | |
} | |
div.license-attribution > p:first-of-type { | |
text-align:center; | |
font-size: 0.75em; | |
} | |
ol.lst-kix_list_20-0{list-style-type:none;margin-bottom:15px;} | |
.lst-kix_list_20-0>li{counter-increment:lst-ctn-kix_list_20-0} | |
ol.lst-kix_list_20-0.start{counter-reset:lst-ctn-kix_list_20-0 0} | |
.lst-kix_list_20-0>li:before{content:"" counter(lst-ctn-kix_list_20-0,decimal) ". "} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment