git.iko.soy/typeable/pandoc
on master help sign in
epub.css: wrap overlong lines in highlighted code blocks.

This fixes a problem in iBooks v2.4 with our earlier horizontally scrolling code blocks. The problem seems to be a bug in iBooks, not pandoc, but since iBooks is a major target we're changing pandoc's default behavior so that pandoc-produced epubs work on that platform. Closes #6242.

commite2bc913c27d78396bbab727142065d64ceee31d0 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 18 May 2020, 22:58 (6 years ago) parentc048003
1 file changed+6
data/epub.css+6
data/epub.css+6
@@ -23,3 +23,9 @@ span.underline{ text-decoration: underline; }
2323q { quotes: "“" "”" "‘" "’"; }
2424div.column{ display: inline-block; vertical-align: top; width: 50%; }
2525div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
26+@media screen { /* Workaround for iBooks issue; see #6242 */
27+ .sourceCode {
28+ overflow: visible !important;
29+ white-space: pre-wrap !important;
30+ }
31+}