print.scss 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  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 screen{
  11. @media print {
  12. /* Dimension et marges de page */
  13. @page {
  14. size: A4 portrait;
  15. margin: 1.5cm 1.5cm;
  16. // @bottom-center {
  17. // content: "Page " counter(page) " / " counter(pages);
  18. // }
  19. }
  20. // @page:first {
  21. // @top-center {
  22. // content: "Titre du document";
  23. // font-size: 14pt;
  24. // font-weight: bold;
  25. // }
  26. // }
  27. /* Reset général */
  28. * {
  29. all: unset;
  30. display: revert;
  31. box-sizing: border-box;
  32. }
  33. img {
  34. max-width: 100%;
  35. }
  36. input,
  37. textarea,
  38. select {
  39. all: revert;
  40. }
  41. /* On redéfinit les styles globaux (12pt = 16px) */
  42. body {
  43. width: auto;
  44. margin: 0;
  45. font-family: serif;
  46. font-size: 12pt;
  47. font-family: Georgia, serif;
  48. line-height: 1.5;
  49. color: #000000 !important;
  50. background-color: #ffffff !important;
  51. }
  52. // #fotter-bottom{
  53. // box-shadow: none !important;
  54. // border-top: rgba($color: #000000, $alpha: 0.5);
  55. // a[href^="http"]:after,
  56. // a[href^="https"]:after {
  57. // content: "";
  58. // }
  59. // }
  60. .back-cover{
  61. break-before: page;
  62. // margin-top: 55rem;
  63. display: flex;
  64. flex-direction: column ;
  65. justify-content: center;
  66. .region{
  67. h2{
  68. margin-top: 0;
  69. color: $blue-dark;
  70. font-size: 1.2rem;
  71. }
  72. }
  73. .view-id-partenaires{
  74. .view-content {
  75. img{
  76. width: 5rem;
  77. height: auto;
  78. }
  79. a[href^="http"]:after{display: none;}
  80. }
  81. .views-row-wrapper{
  82. display: flex;
  83. flex-direction: row;
  84. flex-wrap: wrap;
  85. }
  86. }
  87. }
  88. /* Espacements typographiques (15pt = 20px) */
  89. p,
  90. blockquote,
  91. label,
  92. ul,
  93. ol {
  94. margin-block: 0 15pt;
  95. }
  96. p:last-child {
  97. margin-bottom: 0;
  98. }
  99. /* Titrages (24pt = 32px) */
  100. h1 {
  101. margin-block: 0 24pt;
  102. font-weight: 700;
  103. font-size: 18pt;
  104. line-height: 1.1;
  105. }
  106. h2 {
  107. margin-block: 0 18pt;
  108. font-weight: 700;
  109. font-size: 16pt;
  110. line-height: 1.1;
  111. }
  112. h3 {
  113. margin-block: 0 15pt;
  114. font-weight: 700;
  115. font-size: 14pt;
  116. }
  117. h4 {
  118. margin-block: 0 12pt;
  119. font-weight: 700;
  120. font-size: 12pt;
  121. }
  122. /* Classes dédiées print / no-print */
  123. .print {
  124. display: revert;
  125. }
  126. .no-print {
  127. display: none;
  128. }
  129. /* Pas de veuves ou orphelines (3 lignes minimum) */
  130. p,
  131. blockquote {
  132. orphans: 3;
  133. widows: 3;
  134. }
  135. /* Pas de saut de page au sein de ces éléments */
  136. blockquote,
  137. ul,
  138. ol,
  139. figure,
  140. table,
  141. .paragraph,
  142. footer,
  143. .top_top,
  144. .top_bottom {
  145. page-break-inside: avoid;
  146. }
  147. /* Pas de saut de page après ces éléments */
  148. h1,
  149. h2,
  150. h3,
  151. h4,
  152. caption,
  153. .field--name-field-titre {
  154. page-break-after: avoid;
  155. }
  156. /* Styles des liens */
  157. a,
  158. a:link,
  159. a:visited {
  160. background: transparent !important;
  161. color: unset;
  162. font-weight: 700;
  163. text-decoration: underline !important;
  164. }
  165. /* On affiche l'URL des liens externes */
  166. a[href^="http"]:after,
  167. a[href^="https"]:after {
  168. content: " (" attr(href) ")";
  169. }
  170. /* On masque les vidéos, header et menu de navigation */
  171. video,
  172. object,
  173. iframe,
  174. header,
  175. nav {
  176. display: none !important;
  177. width: 0 !important;
  178. height: 0 !important;
  179. overflow: hidden !important;
  180. }
  181. /* Style page projet */
  182. .page-node-type-projet{
  183. .layout__region--top{
  184. width: 100% !important;
  185. padding-top: 0rem !important;
  186. .top_top{
  187. flex-direction: column !important;
  188. .block-entity-fieldnodefield-photo{
  189. width: 100% !important;
  190. }
  191. .slick-dots, .slick-arrow{
  192. display: none;
  193. }
  194. // .slick-list{
  195. // overflow: visible;
  196. // .slick-track{
  197. // display: flex;
  198. // flex-direction: row;
  199. // flex-wrap: wrap;
  200. // width: 100%;
  201. // }
  202. // }
  203. .top_right{
  204. width: 100% !important;
  205. }
  206. }
  207. .top_bottom{
  208. width: 100% !important;
  209. }
  210. }
  211. .layout__region--first{
  212. display: none;
  213. }
  214. .layout__region--second{
  215. flex: 0 1 100% !important;
  216. }
  217. }
  218. }