1 | | /* |
2 | | Theme Name: Twenty Nineteen |
3 | | |
4 | | Adding print support. The print styles are based on the the great work of |
5 | | Andreas Hecht in https://www.jotform.com/blog/css-perfect-print-stylesheet-98272/. |
6 | | */ |
7 | | |
8 | | /*-------------------------------------------------------------- |
9 | | >>> TABLE OF CONTENTS: |
10 | | ---------------------------------------------------------------- |
11 | | # Margins |
12 | | # Typography |
13 | | # Page breaks |
14 | | # Links |
15 | | # Visibility |
16 | | --------------------------------------------------------------*/ |
17 | | |
18 | | @media print { |
19 | | |
20 | | /* Margins */ |
21 | | |
22 | | @page { |
23 | | margin: 2cm; |
24 | | } |
25 | | |
26 | | .entry { |
27 | | margin-top: 1em; |
28 | | } |
29 | | |
30 | | .entry .entry-header, .site-footer .site-info { |
31 | | margin: 0; |
32 | | } |
33 | | |
34 | | /* Fonts */ |
35 | | |
36 | | body { |
37 | | font: 13pt Georgia, "Times New Roman", Times, serif; |
38 | | line-height: 1.3; |
39 | | background: #fff !important; |
40 | | color: #000; |
41 | | } |
42 | | |
43 | | h1 { |
44 | | font-size: 24pt; |
45 | | } |
46 | | |
47 | | h2, |
48 | | h3, |
49 | | h4, |
50 | | .has-regular-font-size, |
51 | | .has-large-font-size, |
52 | | h2.author-title, |
53 | | p.author-bio, |
54 | | .comments-title, h3 { |
55 | | font-size: 14pt; |
56 | | margin-top: 25px; |
57 | | } |
58 | | |
59 | | /* Page breaks */ |
60 | | |
61 | | a { |
62 | | page-break-inside: avoid |
63 | | } |
64 | | |
65 | | blockquote { |
66 | | page-break-inside: avoid; |
67 | | } |
68 | | |
69 | | h1, |
70 | | h2, |
71 | | h3, |
72 | | h4, |
73 | | h5, |
74 | | h6 { |
75 | | page-break-after: avoid; |
76 | | page-break-inside: avoid |
77 | | } |
78 | | |
79 | | img { |
80 | | page-break-inside: avoid; |
81 | | page-break-after: avoid; |
82 | | } |
83 | | |
84 | | table, pre { |
85 | | page-break-inside: avoid; |
86 | | } |
87 | | |
88 | | ul, ol, dl { |
89 | | page-break-before: avoid; |
90 | | } |
91 | | |
92 | | /* Links */ |
93 | | |
94 | | a:link, a:visited, a { |
95 | | background: transparent; |
96 | | font-weight: bold; |
97 | | text-decoration: underline; |
98 | | text-align: left; |
99 | | } |
100 | | |
101 | | a { |
102 | | page-break-inside: avoid; |
103 | | } |
104 | | |
105 | | a[href^=http]:after { |
106 | | content: " < " attr(href) "> "; |
107 | | } |
108 | | |
109 | | a:after > img { |
110 | | content: ""; |
111 | | } |
112 | | |
113 | | article a[href^="#"]:after { |
114 | | content: ""; |
115 | | } |
116 | | |
117 | | a:not(:local-link):after { |
118 | | content: " < " attr(href) "> "; |
119 | | } |
120 | | |
121 | | /* Visibility */ |
122 | | .main-navigation, |
123 | | .site-title + .main-navigation, |
124 | | .social-navigation, |
125 | | .site-branding-container:before, |
126 | | .entry .entry-title:before, |
127 | | .entry-footer, |
128 | | .author-description:before, |
129 | | .post-navigation, |
130 | | .widget-area, |
131 | | .comment-form-flex, |
132 | | .comment-reply, |
133 | | .comment .comment-metadata .edit-link { |
134 | | display: none; |
135 | | } |
136 | | |
137 | | .entry .entry-content .wp-block-button .wp-block-button__link, |
138 | | .entry .entry-content .button { |
139 | | color: #000; |
140 | | background: none; |
141 | | } |
142 | | |
143 | | /* Site Header (With Featured Image) */ |
144 | | .site-header.featured-image { |
145 | | min-height: 0; |
146 | | |
147 | | .main-navigation a, |
148 | | .main-navigation a + svg, |
149 | | .social-navigation a, |
150 | | .site-title a, |
151 | | .site-featured-image a, |
152 | | .site-branding .site-title, |
153 | | .site-branding .site-description, |
154 | | .main-navigation a:after, |
155 | | .main-navigation .main-menu > li.menu-item-has-children:after, |
156 | | .main-navigation li, |
157 | | .social-navigation li, |
158 | | .entry-meta, |
159 | | .entry-title, |
160 | | &#masthead .site-title a { |
161 | | color: #000; |
162 | | text-shadow: none; |
163 | | } |
164 | | |
165 | | .site-featured-image .entry-header, |
166 | | .site-branding-container { |
167 | | margin-top: 0; |
168 | | margin-bottom: 0; |
169 | | } |
170 | | |
171 | | .site-featured-image .post-thumbnail img { |
172 | | position: relative; |
173 | | height: initial; |
174 | | width: initial; |
175 | | object-fit: none; |
176 | | min-width: 0; |
177 | | min-height: 0; |
178 | | max-width: 100%; |
179 | | margin-top: 1rem; |
180 | | } |
181 | | } |
182 | | |
183 | | /* Remove image filters from featured image */ |
184 | | .image-filters-enabled { |
185 | | |
186 | | *:after { |
187 | | display: none !important; |
188 | | } |
189 | | |
190 | | .site-header.featured-image .site-featured-image:before { |
191 | | display: none; |
192 | | } |
193 | | |
194 | | .site-header.featured-image .site-featured-image .post-thumbnail img { |
195 | | filter: none; |
196 | | } |
197 | | } |
| 1 | /* |
| 2 | Theme Name: Twenty Nineteen |
| 3 | |
| 4 | Adding print support. The print styles are based on the the great work of |
| 5 | Andreas Hecht in https://www.jotform.com/blog/css-perfect-print-stylesheet-98272/. |
| 6 | */ |
| 7 | |
| 8 | /*-------------------------------------------------------------- |
| 9 | >>> TABLE OF CONTENTS: |
| 10 | ---------------------------------------------------------------- |
| 11 | # Margins |
| 12 | # Typography |
| 13 | # Page breaks |
| 14 | # Links |
| 15 | # Visibility |
| 16 | --------------------------------------------------------------*/ |
| 17 | |
| 18 | @media print { |
| 19 | /* Margins */ |
| 20 | |
| 21 | @page { |
| 22 | margin: 2cm; |
| 23 | } |
| 24 | |
| 25 | .entry { |
| 26 | margin-top: 1em; |
| 27 | } |
| 28 | |
| 29 | .entry .entry-header, .site-footer .site-info { |
| 30 | margin: 0; |
| 31 | } |
| 32 | |
| 33 | /* Fonts */ |
| 34 | |
| 35 | body { |
| 36 | font: 13pt Georgia, "Times New Roman", Times, serif; |
| 37 | line-height: 1.3; |
| 38 | background: #fff !important; |
| 39 | color: #000; |
| 40 | } |
| 41 | |
| 42 | h1 { |
| 43 | font-size: 24pt; |
| 44 | } |
| 45 | |
| 46 | h2, |
| 47 | h3, |
| 48 | h4, |
| 49 | .has-regular-font-size, |
| 50 | .has-large-font-size, |
| 51 | h2.author-title, |
| 52 | p.author-bio, |
| 53 | .comments-title, h3 { |
| 54 | font-size: 14pt; |
| 55 | margin-top: 25px; |
| 56 | } |
| 57 | |
| 58 | /* Page breaks */ |
| 59 | |
| 60 | a { |
| 61 | page-break-inside: avoid |
| 62 | } |
| 63 | |
| 64 | blockquote { |
| 65 | page-break-inside: avoid; |
| 66 | } |
| 67 | |
| 68 | h1, |
| 69 | h2, |
| 70 | h3, |
| 71 | h4, |
| 72 | h5, |
| 73 | h6 { |
| 74 | page-break-after: avoid; |
| 75 | page-break-inside: avoid |
| 76 | } |
| 77 | |
| 78 | img { |
| 79 | page-break-inside: avoid; |
| 80 | page-break-after: avoid; |
| 81 | } |
| 82 | |
| 83 | table, pre { |
| 84 | page-break-inside: avoid; |
| 85 | } |
| 86 | |
| 87 | ul, ol, dl { |
| 88 | page-break-before: avoid; |
| 89 | } |
| 90 | |
| 91 | /* Links */ |
| 92 | |
| 93 | a:link, a:visited, a { |
| 94 | background: transparent; |
| 95 | font-weight: bold; |
| 96 | text-decoration: underline; |
| 97 | text-align: left; |
| 98 | } |
| 99 | |
| 100 | a { |
| 101 | page-break-inside: avoid; |
| 102 | } |
| 103 | |
| 104 | a[href^=http]:after { |
| 105 | content: " < " attr(href) "> "; |
| 106 | } |
| 107 | |
| 108 | a:after > img { |
| 109 | content: ""; |
| 110 | } |
| 111 | |
| 112 | article a[href^="#"]:after { |
| 113 | content: ""; |
| 114 | } |
| 115 | |
| 116 | a:not(:local-link):after { |
| 117 | content: " < " attr(href) "> "; |
| 118 | } |
| 119 | |
| 120 | /* Visibility */ |
| 121 | .main-navigation, |
| 122 | .site-title + .main-navigation, |
| 123 | .social-navigation, |
| 124 | .site-branding-container:before, |
| 125 | .entry .entry-title:before, |
| 126 | .entry-footer, |
| 127 | .author-description:before, |
| 128 | .post-navigation, |
| 129 | .widget-area, |
| 130 | .comment-form-flex, |
| 131 | .comment-reply, |
| 132 | .comment .comment-metadata .edit-link { |
| 133 | display: none; |
| 134 | } |
| 135 | |
| 136 | .entry .entry-content .wp-block-button .wp-block-button__link, |
| 137 | .entry .entry-content .button { |
| 138 | color: #000; |
| 139 | background: none; |
| 140 | } |
| 141 | |
| 142 | /* Site Header (With Featured Image) */ |
| 143 | .site-header.featured-image { |
| 144 | min-height: 0; |
| 145 | |
| 146 | .main-navigation a, |
| 147 | .main-navigation a + svg, |
| 148 | .social-navigation a, |
| 149 | .site-title a, |
| 150 | .site-featured-image a, |
| 151 | .site-branding .site-title, |
| 152 | .site-branding .site-description, |
| 153 | .main-navigation a:after, |
| 154 | .main-navigation .main-menu > li.menu-item-has-children:after, |
| 155 | .main-navigation li, |
| 156 | .social-navigation li, |
| 157 | .entry-meta, |
| 158 | .entry-title, |
| 159 | &#masthead .site-title a { |
| 160 | color: #000; |
| 161 | text-shadow: none; |
| 162 | } |
| 163 | |
| 164 | .site-featured-image .entry-header, |
| 165 | .site-branding-container { |
| 166 | margin-top: 0; |
| 167 | margin-bottom: 0; |
| 168 | } |
| 169 | |
| 170 | .site-featured-image .post-thumbnail img { |
| 171 | position: relative; |
| 172 | height: initial; |
| 173 | width: initial; |
| 174 | object-fit: none; |
| 175 | min-width: 0; |
| 176 | min-height: 0; |
| 177 | max-width: 100%; |
| 178 | margin-top: 1rem; |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | /* Remove image filters from featured image */ |
| 183 | .image-filters-enabled { |
| 184 | |
| 185 | *:after { |
| 186 | display: none !important; |
| 187 | } |
| 188 | |
| 189 | .site-header.featured-image .site-featured-image:before { |
| 190 | display: none; |
| 191 | } |
| 192 | |
| 193 | .site-header.featured-image .site-featured-image .post-thumbnail img { |
| 194 | filter: none; |
| 195 | } |
| 196 | } |