Lungo.layout.styl 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /**
  2. * Stylesheet
  3. *
  4. * @namespace Lungo
  5. * @class Layout
  6. *
  7. * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  8. */
  9. @import "import/constants.styl"
  10. @import "import/vendor.styl"
  11. section
  12. position: absolute
  13. top: 0
  14. left: 0
  15. width: 100%
  16. height: 100%
  17. z-index: -1
  18. display: none
  19. transition-property( opacity, z-index, transform )
  20. transition-duration( 300ms )
  21. transition-timing-function( DEFAULT_TRANSITION )
  22. transform( translateZ(0) )
  23. backface-visibility( hidden )
  24. &:first-child, &.show
  25. z-index: 1
  26. display: block
  27. &.hide
  28. z-index: -1
  29. display: none
  30. &[data-transition]
  31. display: block !important
  32. /* Transition: POP */
  33. &[data-transition="pop"]
  34. opacity: 0
  35. transform( scale(1.15) )
  36. &:first-child, &.show
  37. transform( scale(1) )
  38. opacity: 1
  39. &.hide
  40. transform( scale(0.9) )
  41. opacity: 0
  42. /* Transition: SLIDE */
  43. &[data-transition="slide"]
  44. transform( translateX(100%) )
  45. visibility: visible !important
  46. & > header > *, & > article > *
  47. opacity: 0
  48. transition( opacity 400ms DEFAULT_TRANSITION )
  49. &:first-child, &.show
  50. transform( translateX(0%) )
  51. & > header > *, & > article > *
  52. opacity: 1
  53. &.hide
  54. transform( translateX(-100%) )
  55. & > header > *, & > article > *
  56. opacity: 0
  57. /* Transition: COVER */
  58. &[data-transition="cover"]
  59. transform( translateY(110%) )
  60. &:first-child, &.show, &.hide
  61. transform( translateY(0%) )
  62. /* Transition: FADE */
  63. &[data-transition="fade"]
  64. opacity: 0
  65. &:first-child, &.show
  66. opacity: 1
  67. &:hide
  68. opacity: 0
  69. header, footer
  70. position: absolute
  71. left: 0
  72. width: 100%
  73. display: block
  74. z-index: 2
  75. header
  76. top: 0
  77. height: HEADER_FOOTER_HEIGHT
  78. line-height: HEADER_FOOTER_HEIGHT
  79. & .title
  80. margin-left: 4px
  81. float: left
  82. z-index: -1
  83. font-size: 1.2em
  84. font-weight: bold
  85. &.with-subtitle
  86. line-height: 34px
  87. & .subtitle
  88. position: relative
  89. top: -4px
  90. display: block
  91. font-size: 0.7em
  92. line-height: 0.7em
  93. & img
  94. height: 24px
  95. &.centered
  96. position: absolute
  97. left: 0px
  98. right: 0px
  99. text-align: center
  100. display: inline-block
  101. footer
  102. bottom: 0
  103. height: HEADER_FOOTER_HEIGHT