lungo.widgets.styl 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /**
  2. * Stylesheet
  3. *
  4. * @namespace Lungo.Layout
  5. * @class Widgets
  6. *
  7. * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  8. */
  9. @import "constants.styl"
  10. [data-article].hide
  11. display: none
  12. .overthrow-enabled .overthrow
  13. overflow: auto
  14. -webkit-overflow-scrolling: touch
  15. .scroll
  16. overflow-x: hidden
  17. overflow-y: scroll
  18. -webkit-overflow-scrolling: touch
  19. -webkit-box-flex: 1
  20. // & > *
  21. // 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;
  22. // background-repeat: no-repeat;
  23. // background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px;
  24. // background-attachment: local, local, scroll, scroll;
  25. &.horizontal
  26. overflow-x: scroll
  27. overflow-y: hidden
  28. white-space: nowrap
  29. /* BUG (iOS) POSITION: relative childrens */
  30. & > *
  31. -webkit-transform: translate3d(0, 0, 0)
  32. :not(.icon)
  33. &.left
  34. float: left
  35. &.right
  36. float: right
  37. .hidden
  38. display: none
  39. .block
  40. display: block
  41. .indented > *
  42. padding: INDENT
  43. /* ================================ TAG ================================ */
  44. .tag
  45. display: inline-block
  46. padding: 0 3px
  47. font-size: FONT_SIZE_TINY
  48. line-height: 1.25em
  49. height: 1.35em
  50. text-align: center
  51. size = 5px
  52. .margin
  53. &.bottom
  54. margin-bottom: size
  55. /* ================================ .LAYOUT ================================ */
  56. .layout
  57. display-box()
  58. height: inherit !important
  59. &:not(.horizontal)
  60. box-orient(vertical)
  61. & > [data-layout=middle]
  62. height: 50%
  63. & > [data-layout=third]
  64. height: 33%
  65. & > [data-layout=quarter]
  66. height: 25%
  67. &.horizontal
  68. box-orient(horizontal)
  69. & > [data-layout=middle]
  70. width: 50%
  71. & > [data-layout=third]
  72. width: 33%
  73. & > [data-layout=quarter]
  74. width: 25%
  75. & > *
  76. box-flex(0)
  77. & > [data-layout=secondary]
  78. box-flex(1)
  79. & > [data-layout=primary]
  80. box-flex(2)
  81. /* ================================ MENU ================================ */
  82. [data-view-menu]
  83. &:after
  84. content: "▼"
  85. position: relative
  86. top: -5px
  87. left: 1px
  88. font-size: FONT_SIZE_TINY
  89. /* ================================ CAROUSEL ================================ */
  90. [data-control=carousel]
  91. overflow: hidden
  92. list-style: none
  93. margin: 0
  94. // article
  95. // display: block !important