lungo.layout.styl 2.6 KB

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