lungo.layout.styl 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /**
  2. * Stylesheet
  3. *
  4. * @namespace Lungo
  5. * @class Layout
  6. *
  7. * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  8. */
  9. @import "__init.styl"
  10. body, html
  11. height: 100%
  12. width: 100%
  13. margin: 0
  14. padding: 0
  15. overflow: hidden
  16. body
  17. /* ========================================================================= */
  18. /* ============================= ASIDE/SECTION ============================= */
  19. /* ========================================================================= */
  20. & > aside, & > section
  21. display-box()
  22. box-orient(vertical)
  23. height: inherit
  24. // The "Go Faster" hack
  25. webkit-transform: translate3d(0,0,0)
  26. & > header, > footer
  27. box-flex(0)
  28. z-index: 3
  29. position: relative
  30. & > header
  31. ordinal-group(1)
  32. & > article
  33. box-flex(1)
  34. ordinal-group(2)
  35. z-index: -1
  36. & > footer
  37. ordinal-group(3)
  38. /* ============================= HEADER/FOOTER ============================= */
  39. & > header, > footer
  40. height: HEADER_HEIGHT
  41. line-height: HEADER_HEIGHT
  42. & > nav
  43. box-flex(0)
  44. & > .title
  45. z-index: -1
  46. margin: 0 4px
  47. float: left
  48. font-size: FONT_SIZE_LARGE
  49. box-flex(1)
  50. &.centered
  51. position: absolute
  52. left: 32px
  53. right: 32px
  54. text-align: center
  55. display: inline-block
  56. & > img.title
  57. PAD = 18px
  58. height: (HEADER_HEIGHT - PAD)
  59. margin: (PAD / 2) auto
  60. /* ================================ ARTICLE ================================ */
  61. & > article
  62. visibility: hidden
  63. display: none
  64. &.show > article.active, &.hide > article.active, &.hiding > article.active
  65. visibility: visible
  66. display: block
  67. z-index: 1
  68. height: inherit
  69. &.pull
  70. transition-property transform
  71. transition-duration TRANSITION_TIME
  72. & [data-article].hide
  73. display: none
  74. /* ========================================================================= */
  75. /* ================================ SECTION ================================ */
  76. /* ========================================================================= */
  77. & > section
  78. z-index: 2
  79. width: inherit
  80. &:not(.show)
  81. z-index: 1
  82. /* ========================================================================= */
  83. /* ================================= ASIDE ================================= */
  84. /* ========================================================================= */
  85. & > aside
  86. min-width: ASIDE_WIDTH
  87. display: none
  88. z-index: -1
  89. &.active
  90. display-box()
  91. &.show
  92. z-index: 0
  93. display-box()
  94. &.right
  95. right: 0px