Bez popisu

print.scss 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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; // Fallback for browsers without CSS variables support.
  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. // Override color settings that changes the text to white.
  40. .has-background-dark * {
  41. color: #000 !important;
  42. }
  43. h1,
  44. .entry-title,
  45. .singular .entry-title,
  46. .page-title {
  47. font-size: 22pt;
  48. font-weight: bold;
  49. }
  50. h2,
  51. h3,
  52. h4,
  53. .has-regular-font-size,
  54. .has-large-font-size,
  55. h2.author-title,
  56. p.author-bio,
  57. .comments-title,
  58. .archive-description {
  59. font-size: 14pt;
  60. margin-top: 25px;
  61. }
  62. .comment-meta,
  63. .comment-meta .comment-author .fn {
  64. font-size: 13pt;
  65. }
  66. /* Page breaks */
  67. a {
  68. page-break-inside: avoid;
  69. }
  70. blockquote {
  71. page-break-inside: avoid;
  72. }
  73. h1,
  74. h2,
  75. h3,
  76. h4,
  77. h5,
  78. h6 {
  79. page-break-after: avoid;
  80. page-break-inside: avoid;
  81. }
  82. img {
  83. page-break-inside: avoid;
  84. page-break-after: avoid;
  85. }
  86. table,
  87. pre,
  88. figure {
  89. page-break-inside: avoid;
  90. }
  91. ul,
  92. ol,
  93. dl {
  94. page-break-before: avoid;
  95. }
  96. /* Links */
  97. a:link,
  98. a:visited,
  99. a {
  100. background: transparent;
  101. font-weight: bold;
  102. text-decoration: underline;
  103. text-align: left;
  104. }
  105. a[href^="http"]:after {
  106. content: " < " attr(href) "> ";
  107. }
  108. a:after > img {
  109. content: "";
  110. }
  111. article a[href^="#"]:after {
  112. content: "";
  113. }
  114. a:not(:local-link):after { // stylelint-disable-line selector-pseudo-class-no-unknown
  115. content: " < " attr(href) "> ";
  116. }
  117. .entry-title a:after {
  118. content: "\a < " attr(href) "> ";
  119. white-space: pre;
  120. font-size: 14pt;
  121. }
  122. .cat-links a:after,
  123. .tags-links a:after,
  124. .byline a:after,
  125. .comment-metadata a:after,
  126. .wp-block-calendar a:after,
  127. .wp-block-tag-cloud a:after,
  128. .page-links a:after {
  129. content: "";
  130. }
  131. /* Visibility */
  132. .primary-navigation,
  133. .site-title + .primary-navigation,
  134. .footer-navigation,
  135. .entry-footer,
  136. .post-navigation,
  137. .navigation.pagination,
  138. .widget-area,
  139. .edit-link,
  140. .more-link,
  141. .comment-reply,
  142. .reply,
  143. .comment .comment-metadata .edit-link,
  144. .comment-respond,
  145. #dark-mode-toggler {
  146. display: none !important;
  147. }
  148. .entry .entry-content .wp-block-button .wp-block-button__link,
  149. .entry .entry-content .button,
  150. .entry .entry-content .wp-block-file__button {
  151. color: #000;
  152. background: none;
  153. }
  154. }