styles.css 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. <style type="text/css">
  2. /* the geometry of the page */
  3. /* the size of the crop marks*/
  4. /* the size of bleed */
  5. /**
  6. * Computation
  7. */
  8. /* EXTRA SPACE AROUND THE PAGE: BLEED + CROP */
  9. /* GEOMETRY OF THE PAPER SHEET */
  10. /* SIZE OF SPREAD */
  11. /**
  12. * DEFINITION OF THE PAPER SHEET
  13. */
  14. @page {
  15. size: 210mm 291mm;
  16. margin: 0; }
  17. /**
  18. * CANVAS
  19. */
  20. @media all {
  21. body {
  22. margin: 0; }
  23. .paper {
  24. width: 210mm;
  25. height: 290mm;
  26. box-sizing: border-box;
  27. counter-increment: page-counter;
  28. page-break-inside: avoid;
  29. page-break-after: always;
  30. overflow: hidden; }
  31. .page {
  32. width: 210mm;
  33. height: 290mm;
  34. position: relative; } }
  35. @media print {
  36. html {
  37. width: 210mm; }
  38. body {
  39. /* Allows printing of background colors */
  40. background-color: white;
  41. -webkit-print-color-adjust: exact;
  42. print-color-adjust: exact;
  43. /* Activate opentype features and kernings */
  44. -webkit-font-feature-settings: "liga", "dlig", "clig", "kern";
  45. text-rendering: optimizeLegibility; } }
  46. /**
  47. * Helpers
  48. */
  49. .page-break {
  50. /* Apply this class to an element to put it on a new region.
  51. * Hint:
  52. * You can also use an empty <div class="page-break"></div>
  53. * if you want to put manual page breaks without attaching it to an HTML element
  54. */
  55. break-after: region; }
  56. /* __________________________________ LAYOUT __________________________________ */
  57. .header,
  58. .body,
  59. .footer {
  60. box-sizing: border-box; }
  61. /* __________________________________ HEADER __________________________________ */
  62. .header {
  63. top: 0;
  64. margin: 0;
  65. padding-top: 8mm;
  66. width: 100%;
  67. height: 10mm;
  68. text-align: left; }
  69. .header:after {
  70. content: "Ethica Lectures"; }
  71. /* __________________________________ MAIN SECTION __________________________________ */
  72. .body {
  73. height: 270mm;
  74. width: 210mm;
  75. margin-bottom: 12mm;
  76. padding-top: 18mm;
  77. padding-bottom: 12mm;
  78. position: absolute; }
  79. .recipient {
  80. -webkit-flow-from: contentFlow;
  81. flow-from: contentFlow; }
  82. #content > * {
  83. -webkit-flow-into: contentFlow;
  84. flow-into: contentFlow contents; }
  85. /* __________________________________ FOOTER __________________________________ */
  86. .footer {
  87. position: absolute;
  88. bottom: 0;
  89. margin: 0;
  90. width: 100%;
  91. height: 10mm;
  92. text-align: center; }
  93. .footer:after {
  94. content: counter(page-counter); }
  95. /* mirrored pages */
  96. .paper:nth-child(odd) .header,
  97. .paper:nth-child(odd) .body,
  98. .paper:nth-child(odd) .footer {
  99. padding-left: 20mm;
  100. padding-right: 20mm; }
  101. .paper:nth-child(even) .header,
  102. .paper:nth-child(even) .body,
  103. .paper:nth-child(even) .footer {
  104. padding-left: 20mm;
  105. padding-right: 20mm; }
  106. img {
  107. max-width: 100%; }
  108. h1,
  109. h2,
  110. h3,
  111. h4,
  112. h5,
  113. h6 {
  114. /* Avoids headings to be cut or to be orphans.
  115. * But it doesn't seem to work
  116. * if the element after has a page-break-inside avoid. It tries its best! */
  117. -webkit-region-break-inside: avoid;
  118. -webkit-region-break-after: avoid;
  119. break-inside: avoid;
  120. break-after: avoid; }
  121. /* AN EXAMPLE TO AVOID PAGE BREAK INSIDE,
  122. * HERE NO PARAGRAPH WILL BE CUT,
  123. * BUT YOU MIGHT WANT TO DEACTIVATE THIS */
  124. p {
  125. /*-webkit-region-break-inside: avoid;*/ }
  126. /**
  127. * DEBUG STYLES
  128. */
  129. .debug .paper {
  130. outline: 1px solid blue; }
  131. .debug .page {
  132. outline: 1px solid green; }
  133. .debug .header {
  134. outline: 1px solid pink; }
  135. .debug .body {
  136. outline: 1px solid purple; }
  137. .debug .footer {
  138. outline: 1px solid pink; }
  139. .debug .region-break {
  140. border-top: 1px dashed blue;
  141. box-sizing: border-box; }
  142. .debug img {
  143. outline: 1px solid blue; }
  144. /**
  145. * Style
  146. */
  147. @media screen {
  148. body {
  149. background-color: #EEE; }
  150. .paper {
  151. background-color: #fff;
  152. box-shadow: 0 0 10px 7px #AAA;
  153. margin: 20px; } }
  154. h1 {
  155. font-family: "amiri", serif;
  156. font-weight: bold; }
  157. h2 {
  158. font-family: "amiri", serif;
  159. font-weight: 500; }
  160. h3,
  161. h4,
  162. h5,
  163. h6 {
  164. font-family: 'Open Sans', sans-serif; }
  165. h1 {
  166. font-size: 42pt; }
  167. h2 {
  168. font-size: 32pt; }
  169. h3 {
  170. font-size: 14pt; }
  171. h4 {
  172. font-size: 11pt; }
  173. h5 {
  174. font-size: 11pt; }
  175. h6 {
  176. font-size: 11pt; }
  177. h2 {
  178. margin: 0.2em 0 0.4em 0; }
  179. p, table, li, figcaption {
  180. font-family: 'Open Sans', sans-serif;
  181. font-size: 10pt; }
  182. figure {
  183. display: inline-block;
  184. vertical-align: top;
  185. margin: 4mm 0 0; }
  186. figure img {
  187. border: 1px solid #ccc; }
  188. figure figcaption {
  189. font-size: 8pt; }
  190. img[alt="logo"] {
  191. max-height: 0.9cm;
  192. display: inline-block;
  193. vertical-align: top;
  194. margin: 5mm 5mm 0 0; }
  195. img[alt="logo"] + br {
  196. display: none; }
  197. img[alt~="visuel"] {
  198. margin: 0 4mm 0 0; }
  199. img[alt~="visuel"] + figcaption {
  200. display: none; }
  201. img[alt~="visuel"]:not([alt~="full"]) {
  202. max-height: 6.5cm; }
  203. img[alt~="visuel"][alt~="full"] {
  204. max-width: 85%; }
  205. a {
  206. color: inherit; }
  207. .header:after {
  208. font-family: "amiri", serif;
  209. font-weight: normal;
  210. font-size: 9pt; }
  211. .footer {
  212. text-align: left; }
  213. .footer:after {
  214. font-family: "amiri", serif;
  215. font-weight: bold;
  216. font-size: 10pt; }
  217. </style>