_print.scss 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. /* -----------------------/*
  2. * Reset CSS Print "Bretzel"
  3. * Made par Alsacréations
  4. /* ---------------------- */
  5. /*
  6. * Ressources et documentations :
  7. * 1- https://www.docuseal.co/blog/css-print-page-style
  8. * 2- https://www.alsacreations.com/astuce/lire/1160-Une-feuille-de-styles-de-base-pour-le-media-print.html
  9. */
  10. @media print {
  11. /* Dimension et marges de page */
  12. @page {
  13. size: A4 portrait;
  14. margin: 1.5cm 1.5cm;
  15. }
  16. /* Reset général */
  17. * {
  18. all: unset;
  19. display: revert;
  20. box-sizing: border-box;
  21. }
  22. img {
  23. max-width: 100%;
  24. }
  25. input,
  26. textarea,
  27. select {
  28. all: revert;
  29. }
  30. /* On redéfinit les styles globaux (12pt = 16px) */
  31. body {
  32. width: auto;
  33. margin: 0;
  34. font-family: serif;
  35. font-size: 12pt;
  36. font-family: Georgia, serif;
  37. line-height: 1.5;
  38. color: #000000 !important;
  39. background-color: #ffffff !important;
  40. }
  41. #fotter-bottom{
  42. box-shadow: none !important;
  43. border-top: rgba($color: #000000, $alpha: 0.5);
  44. a[href^="http"]:after,
  45. a[href^="https"]:after {
  46. content: "";
  47. }
  48. }
  49. /* Espacements typographiques (15pt = 20px) */
  50. p,
  51. blockquote,
  52. label,
  53. ul,
  54. ol {
  55. margin-block: 0 15pt;
  56. }
  57. p:last-child {
  58. margin-bottom: 0;
  59. }
  60. /* Titrages (24pt = 32px) */
  61. h1 {
  62. margin-block: 0 24pt;
  63. font-weight: 700;
  64. font-size: 18pt;
  65. line-height: 1.1;
  66. }
  67. h2 {
  68. margin-block: 0 18pt;
  69. font-weight: 700;
  70. font-size: 16pt;
  71. line-height: 1.1;
  72. }
  73. h3 {
  74. margin-block: 0 15pt;
  75. font-weight: 700;
  76. font-size: 14pt;
  77. }
  78. h4 {
  79. margin-block: 0 12pt;
  80. font-weight: 700;
  81. font-size: 12pt;
  82. }
  83. /* Classes dédiées print / no-print */
  84. .print {
  85. display: revert;
  86. }
  87. .no-print {
  88. display: none;
  89. }
  90. /* Pas de veuves ou orphelines (3 lignes minimum) */
  91. p,
  92. blockquote {
  93. orphans: 3;
  94. widows: 3;
  95. }
  96. /* Pas de saut de page au sein de ces éléments */
  97. blockquote,
  98. ul,
  99. ol,
  100. figure,
  101. table,
  102. .paragraph,
  103. footer,
  104. .top_top,
  105. .top_bottom {
  106. page-break-inside: avoid;
  107. }
  108. /* Pas de saut de page après ces éléments */
  109. h1,
  110. h2,
  111. h3,
  112. h4,
  113. caption,
  114. .field--name-field-titre {
  115. page-break-after: avoid;
  116. }
  117. /* Styles des liens */
  118. a,
  119. a:link,
  120. a:visited {
  121. background: transparent !important;
  122. color: unset;
  123. font-weight: 700;
  124. text-decoration: underline !important;
  125. }
  126. /* On affiche l'URL des liens externes */
  127. a[href^="http"]:after,
  128. a[href^="https"]:after {
  129. content: " (" attr(href) ")";
  130. }
  131. /* On masque les vidéos, header et menu de navigation */
  132. video,
  133. object,
  134. iframe,
  135. header,
  136. nav {
  137. display: none !important;
  138. width: 0 !important;
  139. height: 0 !important;
  140. overflow: hidden !important;
  141. }
  142. /* Style page projet */
  143. .page-node-type-projet{
  144. .layout__region--top{
  145. width: 100% !important;
  146. padding-top: 0rem !important;
  147. .top_top{
  148. flex-direction: column !important;
  149. .block-entity-fieldnodefield-photo{
  150. width: 100% !important;
  151. }
  152. .top_right{
  153. width: 100% !important;
  154. }
  155. }
  156. .top_bottom{
  157. width: 100% !important;
  158. }
  159. }
  160. .layout__region--first{
  161. display: none;
  162. }
  163. .layout__region--second{
  164. flex: 0 1 100% !important;
  165. }
  166. }
  167. }