]> BookStack Code Mirror - bookstack/blob - resources/sass/export-styles.scss
CommentDisplayTest correct namespace
[bookstack] / resources / sass / export-styles.scss
1 @use "sass:math";
2
3 @use "vars";
4 @use "mixins";
5 @use "html";
6 @use "text";
7 @use "tables";
8 @use "content";
9
10 html, body {
11   background-color: #FFF;
12 }
13
14 body {
15   font-family: 'DejaVu Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Roboto", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
16   margin: 0;
17   padding: 0;
18   display: block;
19 }
20
21 table {
22   border-spacing: 0;
23   border-collapse: collapse;
24 }
25
26 .page-content {
27   overflow: hidden;
28 }
29
30 // Prevent code block overflow on export
31 pre {
32   padding-left: 12px;
33 }
34 pre:before {
35   display: none;
36 }
37 pre code {
38   white-space: pre-wrap;
39 }
40
41 .page-break {
42   page-break-after: always;
43 }
44 @media screen {
45   .page-break {
46     border-top: 1px solid #DDD;
47   }
48 }
49
50 ul.contents ul li {
51   list-style: circle;
52 }
53
54 .chapter-hint {
55   color: #888;
56   margin-top: 32px;
57 }
58 .chapter-hint + h1 {
59   margin-top: 0;
60 }
61
62 // PDF specific overrides
63 body.export-format-pdf {
64   font-size: 14px;
65   line-height: 1.2;
66
67   h1, h2, h3, h4, h5, h6 {
68     line-height: 1.2;
69   }
70
71   table {
72     max-width: 800px !important;
73     font-size: 0.8em;
74     width: 100% !important;
75   }
76
77   table td {
78     width: auto !important;
79   }
80
81   .page-content .float {
82     float: none !important;
83   }
84
85   .page-content img.align-left, .page-content img.align-right  {
86     float: none !important;
87     clear: both;
88     display: block;
89   }
90
91 }
92
93 // DOMPDF pdf export specific overrides
94 body.export-format-pdf.export-engine-dompdf {
95   // Fix for full width linked image sizes on DOMPDF
96   .page-content a > img {
97     max-width: 700px;
98   }
99   // Undoes the above for table images to prevent visually worse scenario, Awaiting next DOMPDF release for patch
100   .page-content td a > img {
101     max-width: 100%;
102   }
103 }