Lungo.widgets.form.styl 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. /**
  2. * Stylesheet
  3. *
  4. * @namespace Lungo.Widgets
  5. * @class Form
  6. *
  7. * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  8. */
  9. @import "import/constants.styl"
  10. @import "import/vendor.styl"
  11. FORM_INPUT_HEIGHT = 30px
  12. ROUNDED_RADIUS = 2px
  13. PROGRESS_HEIGHT = 12px
  14. form, .form
  15. & label:not(.select)
  16. font-size: 0.9em
  17. & input, textarea, select, .progress
  18. margin-bottom: 8px
  19. & input[type="text"], input[type="password"], input[type="date"], input[type="datetime"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"], input[type="time"], input[type="url"], select, textarea
  20. display: block
  21. width: 100%
  22. padding: 6px
  23. height: FORM_INPUT_HEIGHT
  24. transition all 0.15s linear
  25. font-family: inherit
  26. font-size: inherit
  27. -webkit-appearance: none
  28. -webkit-user-select: text
  29. -webkit-font-smoothing: antialiased
  30. &:focus
  31. outline: none !important;
  32. & textarea
  33. min-height: 48px
  34. input[type=search]
  35. width: 89%
  36. display: inline-block
  37. & + .button
  38. float: right
  39. padding: 0px
  40. width: 10%
  41. height: FORM_INPUT_HEIGHT
  42. line-height: FORM_INPUT_HEIGHT
  43. & select
  44. width: 100%
  45. height: FORM_INPUT_HEIGHT
  46. label.select
  47. position: relative
  48. display: inline-block
  49. width: 100%
  50. .select:after
  51. text-align: center
  52. position: absolute
  53. top: 3px
  54. right: 0
  55. bottom: 0
  56. height: FORM_INPUT_HEIGHT
  57. width: FORM_INPUT_HEIGHT
  58. content: "▼"
  59. pointer-events:none
  60. line-height: 33px
  61. .no-pointer-events .select:after
  62. content: none
  63. & input[type=range]
  64. -webkit-appearance: none
  65. outline: none
  66. &:not(.checkbox)
  67. height: PROGRESS_HEIGHT
  68. width: 100%
  69. padding: 0px
  70. margin-top: 2px
  71. border: 0
  72. cursor: ew-resize
  73. &::-webkit-slider-thumb
  74. top: -1px
  75. &.checkbox
  76. width:70px
  77. height: 30px
  78. padding: 1px 2px
  79. font-family:'lungojsicon'
  80. &:after
  81. content: "\0055"
  82. position: relative
  83. float: right
  84. top: -23px
  85. padding: 0 8px
  86. font-size: 1.5em
  87. &.active:after
  88. float: left
  89. content: "\0051"
  90. font-size: 1.6em
  91. &::-webkit-slider-thumb
  92. -webkit-appearance: none
  93. width: 30px
  94. height: 24px
  95. position:relative
  96. margin:2px 2px 2px 2px
  97. border: none
  98. &::-webkit-slider-thumb::after
  99. width:12px
  100. height:12px
  101. display:block
  102. content:""
  103. position:relative
  104. border-radius: 8px
  105. z-index:9
  106. top:6px
  107. left:9px
  108. & .progress
  109. width: 100%
  110. margin-bottom: 8px
  111. .labels
  112. font-size: 1.0em
  113. display: block
  114. & span:last-child
  115. float: right
  116. & .bar
  117. height: PROGRESS_HEIGHT
  118. line-height: PROGRESS_HEIGHT
  119. display: block
  120. & .value
  121. display:block
  122. height: inherit
  123. width: 0%
  124. transition( width 500ms DEFAULT_TRANSITION )
  125. & .label
  126. float: right
  127. margin-right: 4px
  128. font-size: 0.75em
  129. @media screen and (-webkit-min-device-pixel-ratio:0)
  130. .custom-select
  131. select
  132. padding-right:30px