lungo.layout.nav.styl 4.0 KB

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