layout.scss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /**
  2. * Macro-structure
  3. * ===============
  4. */
  5. .body,
  6. .body:before,
  7. .body:after { position: absolute; }
  8. .body:before,
  9. .body:after { z-index: 500; }
  10. /**
  11. * Zone de composition principale
  12. * ------------------------------
  13. */
  14. .body {
  15. top: $page-margin-top;
  16. bottom: $page-margin-bottom;
  17. }
  18. /* TODO: move into grid.less? */
  19. .bloc { position: absolute; z-index: 500; }
  20. // .debug .header,
  21. // .debug .footer,
  22. // .debug .body,
  23. // .debug .bloc { outline: 1px solid purple; }
  24. /**
  25. * Pieds de page
  26. * -------------
  27. */
  28. .body:before,
  29. .body:after {
  30. display: block;
  31. font-family: sans-serif;
  32. font-size: 6pt;
  33. line-height: $line-height;
  34. letter-spacing: 0.25pt;
  35. z-index: 500;
  36. }
  37. .body:before{
  38. top:-2em;
  39. width:100%;
  40. text-align: center;
  41. }
  42. .body:after{
  43. bottom:-2em;
  44. width:100%;
  45. text-align: center;
  46. }
  47. /*gauche*/
  48. .paper:nth-child(odd) .body:before { content: $header-odd; }
  49. /*droite*/
  50. .paper:nth-child(even) .body:before { content: $header-even; }
  51. .body:after { content: counter(folio); z-index: 499;}
  52. /**
  53. * Miroir
  54. * -------
  55. */
  56. /**
  57. * Placement en miroir des éléments en fonction de si ils se trouvent sur une
  58. * page paire ou une page impaire, en utilisant le pseudo-sélecteur `nth-child`
  59. */
  60. html:not(.facing) .paper:nth-child(odd) .body,
  61. html.facing .paper:nth-child(even) .body {
  62. right: $page-margin-outside;
  63. left: $page-margin-inside;
  64. }
  65. html:not(.facing) .paper:nth-child(even) .body,
  66. html.facing .paper:nth-child(odd) .body {
  67. left: $page-margin-outside;
  68. right: $page-margin-inside;
  69. }
  70. // html:not(.facing) .paper:nth-child(odd) .body:before,
  71. // html.facing .paper:nth-child(even) .body:before {
  72. // @extend .x1;
  73. // @extend .w4;
  74. // }
  75. // html:not(.facing) .paper:nth-child(even) .body:before,
  76. // html.facing .paper:nth-child(odd) .body:before {
  77. // @extend .x5;
  78. // @extend .w4;
  79. // }
  80. // html:not(.facing) .paper:nth-child(odd) .body:after,
  81. // html.facing .paper:nth-child(even) .body:after {
  82. // @extend .x5;
  83. // @extend .w1;
  84. // text-align: left;
  85. // }
  86. // html:not(.facing) .paper:nth-child(even) .body:after,
  87. // html.facing .paper:nth-child(odd) .body:after {
  88. // @extend .x1;
  89. // @extend .w1;
  90. // text-align: left;
  91. // }
  92. #flow-main {
  93. position: relative;
  94. -webkit-flow-into: flow-main;
  95. flow-into: flow-main;
  96. }
  97. .flow-main {
  98. -webkit-flow-from: flow-main;
  99. flow-from: flow-main;
  100. }