print.css 2.5 KB

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