X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/d62cdd58d3a6b40ac181a68ebb2af6cf7c74dca5..refs/pull/5681/head:/resources/sass/export-styles.scss diff --git a/resources/sass/export-styles.scss b/resources/sass/export-styles.scss index 1a8b34c5b..8dd7be375 100644 --- a/resources/sass/export-styles.scss +++ b/resources/sass/export-styles.scss @@ -1,13 +1,11 @@ @use "sass:math"; -@import "variables"; -@import "mixins"; -@import "html"; -@import "text"; -@import "layout"; -@import "blocks"; -@import "tables"; -@import "lists"; -@import "pages"; + +@use "vars"; +@use "mixins"; +@use "html"; +@use "text"; +@use "tables"; +@use "content"; html, body { background-color: #FFF; @@ -33,7 +31,7 @@ table { pre { padding-left: 12px; } -pre:after { +pre:before { display: none; } pre code { @@ -59,4 +57,47 @@ ul.contents ul li { } .chapter-hint + h1 { margin-top: 0; +} + +// PDF specific overrides +body.export-format-pdf { + font-size: 14px; + line-height: 1.2; + + h1, h2, h3, h4, h5, h6 { + line-height: 1.2; + } + + table { + max-width: 800px !important; + font-size: 0.8em; + width: 100% !important; + } + + table td { + width: auto !important; + } + + .page-content .float { + float: none !important; + } + + .page-content img.align-left, .page-content img.align-right { + float: none !important; + clear: both; + display: block; + } + +} + +// DOMPDF pdf export specific overrides +body.export-format-pdf.export-engine-dompdf { + // Fix for full width linked image sizes on DOMPDF + .page-content a > img { + max-width: 700px; + } + // Undoes the above for table images to prevent visually worse scenario, Awaiting next DOMPDF release for patch + .page-content td a > img { + max-width: 100%; + } } \ No newline at end of file