Нет описания

print.css 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. /*
  2. Adding print support. The print styles are based on the the great work of
  3. Andreas Hecht in https://www.jotform.com/blog/css-perfect-print-stylesheet-98272/.
  4. */
  5. /*--------------------------------------------------------------
  6. >>> TABLE OF CONTENTS:
  7. ----------------------------------------------------------------
  8. # Margins & paddings
  9. # Typography
  10. # Page breaks
  11. # Links
  12. # Visibility
  13. --------------------------------------------------------------*/
  14. @media print {
  15. /* Margins & paddings */
  16. @page {
  17. margin: 2cm;
  18. }
  19. .entry .entry-header,
  20. .entry,
  21. .single .site-main > article > .entry-footer {
  22. margin-top: 0;
  23. margin-bottom: 0;
  24. }
  25. .site-footer .site-info {
  26. margin: 0;
  27. }
  28. .site-header {
  29. padding: 0;
  30. }
  31. /* Fonts */
  32. body {
  33. font: 13pt Georgia, "Times New Roman", Times, serif;
  34. font: 13pt var(--global--font-secondary, Georgia, "Times New Roman", Times, serif);
  35. line-height: 1.3;
  36. background: #fff !important;
  37. color: #000;
  38. }
  39. .has-background-dark * {
  40. color: #000 !important;
  41. }
  42. h1,
  43. .entry-title,
  44. .singular .entry-title,
  45. .page-title {
  46. font-size: 22pt;
  47. font-weight: bold;
  48. }
  49. h2,
  50. h3,
  51. h4,
  52. .has-regular-font-size,
  53. .has-large-font-size,
  54. h2.author-title,
  55. p.author-bio,
  56. .comments-title,
  57. .archive-description {
  58. font-size: 14pt;
  59. margin-top: 25px;
  60. }
  61. .comment-meta,
  62. .comment-meta .comment-author .fn {
  63. font-size: 13pt;
  64. }
  65. /* Page breaks */
  66. a {
  67. page-break-inside: avoid;
  68. }
  69. blockquote {
  70. page-break-inside: avoid;
  71. }
  72. h1,
  73. h2,
  74. h3,
  75. h4,
  76. h5,
  77. h6 {
  78. page-break-after: avoid;
  79. page-break-inside: avoid;
  80. }
  81. img {
  82. page-break-inside: avoid;
  83. page-break-after: avoid;
  84. }
  85. table,
  86. pre,
  87. figure {
  88. page-break-inside: avoid;
  89. }
  90. ul,
  91. ol,
  92. dl {
  93. page-break-before: avoid;
  94. }
  95. /* Links */
  96. a:link,
  97. a:visited,
  98. a {
  99. background: transparent;
  100. font-weight: bold;
  101. text-decoration: underline;
  102. text-align: left;
  103. }
  104. a[href^=http]:after {
  105. content: " < " attr(href) "> ";
  106. }
  107. a:after > img {
  108. content: "";
  109. }
  110. article a[href^="#"]:after {
  111. content: "";
  112. }
  113. a:not(:local-link):after {
  114. content: " < " attr(href) "> ";
  115. }
  116. .entry-title a:after {
  117. content: "\a< " attr(href) "> ";
  118. white-space: pre;
  119. font-size: 14pt;
  120. }
  121. .cat-links a:after,
  122. .tags-links a:after,
  123. .byline a:after,
  124. .comment-metadata a:after,
  125. .wp-block-calendar a:after,
  126. .wp-block-tag-cloud a:after,
  127. .page-links a:after {
  128. content: "";
  129. }
  130. /* Visibility */
  131. .primary-navigation,
  132. .site-title + .primary-navigation,
  133. .footer-navigation,
  134. .entry-footer,
  135. .post-navigation,
  136. .navigation.pagination,
  137. .widget-area,
  138. .edit-link,
  139. .more-link,
  140. .comment-reply,
  141. .reply,
  142. .comment .comment-metadata .edit-link,
  143. .comment-respond,
  144. #dark-mode-toggler {
  145. display: none !important;
  146. }
  147. .entry .entry-content .wp-block-button .wp-block-button__link,
  148. .entry .entry-content .button,
  149. .entry .entry-content .wp-block-file__button {
  150. color: #000;
  151. background: none;
  152. }
  153. }