lungo.layout.nav.styl 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. /**
  2. * Stylesheet
  3. *
  4. * @namespace Lungo.Layout
  5. * @class Nav
  6. *
  7. * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  8. */
  9. nav
  10. /* ========================================================================= */
  11. /* ================================= HEADER ================================ */
  12. /* ========================================================================= */
  13. header &
  14. & a, button
  15. position: relative
  16. text-align: center
  17. float: left
  18. height: HEADER_HEIGHT
  19. min-width: HEADER_HEIGHT
  20. & > .icon
  21. font-size: 1.5em
  22. & .tag
  23. position: absolute
  24. top: 0.5em
  25. right: 0.25em
  26. height: FONT_SIZE_LARGE
  27. line-height: FONT_SIZE_LARGE
  28. & .loading
  29. font-size: 1.5em
  30. & + .icon
  31. display: none
  32. &[data-control=groupbar], footer &
  33. display-box()
  34. box-pack(justify)
  35. width: 100%
  36. & > a
  37. box-flex(1)
  38. text-decoration: none
  39. /* ========================================================================= */
  40. /* =============================== GROUPBAR ================================ */
  41. /* ========================================================================= */
  42. &[data-control=groupbar]
  43. z-index: 2
  44. height: HEADER_GROUPBAR_HEIGHT
  45. width: 100%
  46. font-size: FONT_SIZE_SMALL
  47. line-height: HEADER_GROUPBAR_HEIGHT
  48. & > a
  49. padding:0
  50. margin:0
  51. height: HEADER_GROUPBAR_HEIGHT !important
  52. display: block
  53. text-align: center
  54. & .icon, .tag
  55. margin: 0 0.2em
  56. line-height: inherit
  57. /* ========================================================================= */
  58. /* ================================= MENU ================================== */
  59. /* ========================================================================= */
  60. &[data-control=menu]
  61. position: absolute
  62. left: 0
  63. top: 0
  64. top: HEADER_HEIGHT
  65. visibility: hidden
  66. z-index: 2
  67. width: 100%
  68. text-align: center
  69. transform translateY(-120%)
  70. transition-property transform
  71. transition-duration TRANSITION_TIME
  72. transition-timing-function DEFAULT_TRANSITION
  73. backface-visibility hidden
  74. &.show
  75. visibility: visible
  76. transform translateY(0%)
  77. &.icons
  78. font-size: FONT_SIZE_TINY
  79. & > a
  80. width: 25%
  81. float: left
  82. padding: 10px 0
  83. & > .icon
  84. font-size: S = 32px
  85. line-height: S
  86. display: block
  87. &:not(.icons)
  88. font-size: FONT_SIZE_BIG
  89. & > a
  90. display: block
  91. position: relative
  92. padding: INDENT
  93. & > .icon
  94. position: absolute
  95. left: 0.5em
  96. top: 0.5em
  97. font-size: FONT_SIZE_LARGE
  98. line-height: 1.0em
  99. /* ========================================================================= */
  100. /* ================================ FOOTER ================================= */
  101. /* ========================================================================= */
  102. footer &
  103. & a
  104. display: block
  105. padding: 0
  106. height: HEADER_HEIGHT
  107. text-align: center
  108. & .icon
  109. font-size: 2.0em
  110. line-height: inherit
  111. width: HEADER_HEIGHT
  112. display: inline-block
  113. & .tag
  114. position: relative
  115. top: SIZE = -12px
  116. left: SIZE
  117. margin-right: -24px
  118. & .loading
  119. top: 0
  120. font-size: 1.4em
  121. abbr
  122. display: none
  123. &.with-labels
  124. & .icon
  125. font-size: 1.8em
  126. line-height: 1.0em
  127. & abbr
  128. z-index: 1
  129. display: block !important
  130. margin-top: -1.3em
  131. font-size: FONT_SIZE_TINY
  132. line-height: FONT_SIZE_TINY
  133. overflow: hidden
  134. white-space: nowrap
  135. text-overflow: ellipsis
  136. /* ========================================================================= */
  137. /* =========================== MENU KEYFRAMES ============================== */
  138. /* ========================================================================= */
  139. @keyframes menuShow
  140. 0% {transform translateY(-120%)}
  141. 75% {transform translateY(8px)}
  142. 100% {transform translateY(0)}
  143. @keyframes menuHide
  144. 0% {transform translateY(0)}
  145. 25% {transform translateY(8px)}
  146. 100% {transform translateY(-120%)}