lungo.layout.nav.styl 4.2 KB

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