lungo.widget.styl 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. /**
  2. * Stylesheet
  3. *
  4. * @namespace Lungo.Layout
  5. * @class Widgets
  6. *
  7. * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  8. */
  9. @import "__init.styl"
  10. /* ================================ CLASSES ================================ */
  11. .hidden
  12. display: none
  13. .block
  14. display: block
  15. .inline
  16. display: inline
  17. .inline-block
  18. display: inline-block
  19. .indented > *
  20. padding: INDENT
  21. .margined > *
  22. margin: INDENT
  23. .margin-top
  24. margin-top: INDENT
  25. .margin-right
  26. margin-right: INDENT
  27. .margin-bottom
  28. margin-bottom: INDENT
  29. .margin-left
  30. margin-left: INDENT
  31. :not(.icon)
  32. &.left
  33. float: left
  34. &.right
  35. float: right
  36. /* ================================ SCROLL ================================ */
  37. .overthrow-enabled .overthrow
  38. overflow: auto
  39. -webkit-overflow-scrolling: touch
  40. .scroll
  41. overflow-x: hidden
  42. overflow-y: scroll
  43. -webkit-overflow-scrolling: touch
  44. -webkit-box-flex: 1
  45. // & > *
  46. // background: -webkit-linear-gradient(white 30%, hsla(0,0%,100%,0)), -webkit-linear-gradient(hsla(0,0%,100%,0), white 70%) bottom, -webkit-radial-gradient(50% 0, rgba(0,0,0,.2), transparent 70%), -webkit-radial-gradient(50% 100%, rgba(0,0,0,.2), transparent 70%) bottom;
  47. // background-repeat: no-repeat;
  48. // background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px;
  49. // background-attachment: local, local, scroll, scroll;
  50. &.horizontal
  51. overflow-x: scroll
  52. overflow-y: hidden
  53. white-space: nowrap
  54. /* BUG (iOS) POSITION: relative childrens */
  55. & > *
  56. -webkit-transform: translate3d(0, 0, 0)
  57. /* ================================ TEXT ================================ */
  58. .text
  59. &.thin
  60. font-weight: 300
  61. &.normal
  62. font-weight: 400
  63. &.bold
  64. font-weight: 600
  65. &.extra-bold
  66. font-weight: 700
  67. &.italic
  68. font-style: italic
  69. &.underline
  70. text-decoration: underline
  71. &.line-through
  72. text-decoration: line-through
  73. &.align_left
  74. text-align: left
  75. &.align_right
  76. text-align: right
  77. &.align_center
  78. text-align: center
  79. &.align_justify
  80. text-align: justify
  81. &.tiny
  82. font-size: 0.8em
  83. &.small
  84. font-size: FONT_SIZE_SMALL
  85. &.big
  86. font-size: FONT_SIZE_BIG
  87. &.opacity
  88. opacity: 0.5
  89. /* ================================ TAG ================================ */
  90. .tag
  91. display: inline-block
  92. padding: 0px 3px
  93. font-size: FONT_SIZE_TINY
  94. line-height: (FONT_SIZE_LARGE / 1.1)
  95. height: FONT_SIZE_LARGE
  96. text-align: center
  97. min-width: 16px
  98. z-index: 1
  99. size = 5px
  100. .margin
  101. &.bottom
  102. margin-bottom: size
  103. /* ================================ .LAYOUT ================================ */
  104. .layout
  105. display-box()
  106. height: inherit !important
  107. &:not(.horizontal)
  108. box-orient(vertical)
  109. & > [data-layout=middle]
  110. height: 50%
  111. & > [data-layout=third]
  112. height: 33%
  113. & > [data-layout=quarter]
  114. height: 25%
  115. &.horizontal
  116. box-orient(horizontal)
  117. & > [data-layout=middle]
  118. width: 50%
  119. & > [data-layout=third]
  120. width: 33%
  121. & > [data-layout=quarter]
  122. width: 25%
  123. & > *
  124. box-flex(1)
  125. & > [data-layout=secondary]
  126. box-flex(2)
  127. & > [data-layout=primary]
  128. box-flex(3)
  129. /* ================================ MENU ================================ */
  130. [data-view-menu]
  131. &:after
  132. content: "▼"
  133. position: relative
  134. top: -5px
  135. left: 1px
  136. font-size: FONT_SIZE_TINY
  137. /* ================================ CAROUSEL ================================ */
  138. [data-control=carousel]
  139. overflow: hidden
  140. list-style: none
  141. margin: 0
  142. /* ================================== PULL ================================== */
  143. body > section.show > [data-control="pull"]
  144. position: absolute
  145. z-index: -1
  146. top: HEADER_HEIGHT
  147. width: 100%
  148. height: 80px
  149. padding: 10px 0
  150. text-align: center
  151. & > .icon
  152. display: inline-block
  153. width: S = 52px
  154. height: S
  155. font-size: S
  156. line-height: S
  157. transition-property rotate, color
  158. transition-duration TRANSITION_TIME
  159. transition-timing-function DEFAULT_TRANSITION
  160. backface-visibility hidden
  161. & > .loading
  162. display: none
  163. left: 0%
  164. & > strong
  165. position: relative
  166. top: -16px
  167. margin-left: 4px
  168. font-size: FONT_SIZE_NORMAL
  169. &.rotate
  170. & > .icon
  171. transform( rotate(180deg) )
  172. &.refresh
  173. & > .icon
  174. display: none
  175. & > .loading
  176. display: inline-block
  177. /* ================================ SPLASH ================================ */
  178. body > section > article.splash
  179. text-align: center
  180. padding: (INDENT * 2.5)
  181. & .logo
  182. max-width: 192px
  183. margin: 20% 0 7.5% 0
  184. font-size: 2.2em
  185. & .button, button
  186. margin-bottom: (INDENT / 1.5)
  187. & .copyright
  188. position: absolute
  189. width: 100%
  190. bottom: 8px
  191. left: 0px
  192. font-size: FONT_SIZE_TINY
  193. padding: 0px
  194. /* ================================ MESSAGE ================================ */
  195. body > section > article > .empty
  196. text-align: center
  197. width: 256px
  198. display: block
  199. margin: 0 auto
  200. padding-top: 15%
  201. & > *
  202. display: block
  203. margin-bottom: 3%
  204. & > .icon
  205. font-size: S = 120px
  206. line-height: S
  207. & > strong
  208. font-weight: 700
  209. font-size: FONT_SIZE_LARGE
  210. & > small
  211. font-weight: 600
  212. margin-bottom: 5%