|
| 1 | +@charset "UTF-8"; |
| 2 | +/* |
| 3 | +Theme Name: Twenty Twenty |
| 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 | +>>> TABLE OF CONTENTS: |
| 9 | +---------------------------------------------------------------- |
| 10 | +# Margins |
| 11 | +# Paddings |
| 12 | +# Width |
| 13 | +# Typography |
| 14 | +# Page breaks |
| 15 | +# Links |
| 16 | +# Visibility |
| 17 | +--------------------------------------------------------------*/ |
| 18 | +@media print { |
| 19 | + |
| 20 | + /* Margins */ |
| 21 | + |
| 22 | + @page { |
| 23 | + margin: 2cm; |
| 24 | + } |
| 25 | + |
| 26 | + .entry-header, |
| 27 | + .site-footer { |
| 28 | + margin: 0; |
| 29 | + } |
| 30 | + |
| 31 | + /* Paddings */ |
| 32 | + |
| 33 | + .posts { |
| 34 | + padding: 0; |
| 35 | + } |
| 36 | + |
| 37 | + /* Width */ |
| 38 | + |
| 39 | + .entry-content, |
| 40 | + .entry-content p, |
| 41 | + .section-inner, |
| 42 | + .section-inner.max-percentage, |
| 43 | + .section-inner.medium, |
| 44 | + .section-inner.small, |
| 45 | + .section-inner.thin { |
| 46 | + max-width: 100%; |
| 47 | + width: 100%; |
| 48 | + } |
| 49 | + |
| 50 | + /* Fonts */ |
| 51 | + |
| 52 | + body { |
| 53 | + background: #fff !important; |
| 54 | + color: #000; |
| 55 | + font: 13pt Georgia, "Times New Roman", Times, serif; |
| 56 | + line-height: 1.3; |
| 57 | + } |
| 58 | + |
| 59 | + h1 { |
| 60 | + font-size: 20pt; |
| 61 | + } |
| 62 | + |
| 63 | + h2, |
| 64 | + h2.entry-title, |
| 65 | + h3, |
| 66 | + h4, |
| 67 | + .has-regular-font-size, |
| 68 | + .has-large-font-size, |
| 69 | + .comments-header { |
| 70 | + font-size: 14pt; |
| 71 | + margin-top: 1cm; |
| 72 | + } |
| 73 | + |
| 74 | + /* Page breaks */ |
| 75 | + |
| 76 | + a { |
| 77 | + page-break-inside: avoid; |
| 78 | + } |
| 79 | + |
| 80 | + blockquote { |
| 81 | + page-break-inside: avoid; |
| 82 | + } |
| 83 | + |
| 84 | + h1, |
| 85 | + h2, |
| 86 | + h3, |
| 87 | + h4, |
| 88 | + h5, |
| 89 | + h6 { |
| 90 | + page-break-after: avoid; |
| 91 | + page-break-inside: avoid; |
| 92 | + } |
| 93 | + |
| 94 | + img { |
| 95 | + page-break-inside: avoid; |
| 96 | + page-break-after: avoid; |
| 97 | + } |
| 98 | + |
| 99 | + table, |
| 100 | + pre { |
| 101 | + page-break-inside: avoid; |
| 102 | + } |
| 103 | + |
| 104 | + ul, |
| 105 | + ol, |
| 106 | + dl { |
| 107 | + page-break-before: avoid; |
| 108 | + } |
| 109 | + |
| 110 | + /* Links */ |
| 111 | + |
| 112 | + a:link, |
| 113 | + a:visited, |
| 114 | + a { |
| 115 | + background: transparent; |
| 116 | + font-weight: bold; |
| 117 | + text-decoration: underline; |
| 118 | + } |
| 119 | + |
| 120 | + a { |
| 121 | + page-break-inside: avoid; |
| 122 | + } |
| 123 | + |
| 124 | + a[href^="http"]:after { |
| 125 | + content: " < " attr(href) "> "; |
| 126 | + } |
| 127 | + |
| 128 | + a:after > img { |
| 129 | + content: ""; |
| 130 | + } |
| 131 | + |
| 132 | + article a[href^="#"]:after { |
| 133 | + content: ""; |
| 134 | + } |
| 135 | + |
| 136 | + a:not(:local-link):after { |
| 137 | + content: " < " attr(href) "> "; |
| 138 | + } |
| 139 | + |
| 140 | + /* Visibility */ |
| 141 | + |
| 142 | + #site-header, |
| 143 | + .comment-form, |
| 144 | + .comments-wrapper, |
| 145 | + .comment .comment-metadata, |
| 146 | + .footer-social-wrapper, |
| 147 | + .footer-widgets-outer-wrapper, |
| 148 | + .header-navigation-wrapper, |
| 149 | + .pagination-wrapper, |
| 150 | + .post-meta-wrapper.post-meta-single-bottom |
| 151 | + .post-separator, |
| 152 | + .site-logo img { |
| 153 | + display: none; |
| 154 | + } |
| 155 | + |
| 156 | + .entry-content .wp-block-button .wp-block-button__link, |
| 157 | + .entry-content .wp-block-button .wp-block-file__button, |
| 158 | + .entry-content .button { |
| 159 | + background: none; |
| 160 | + color: #000; |
| 161 | + } |
| 162 | +} |
0 commit comments