Lungo.widgets.form.css 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. /**
  2. * Stylesheet
  3. *
  4. * @namespace Lungo.Widgets
  5. * @class Form
  6. *
  7. * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  8. */
  9. /* DIMENSIONS */
  10. /* COLORS */
  11. form {
  12. /* @group search */
  13. }
  14. form.wrapper input:not([type=checkbox]),
  15. form textarea,
  16. form select {
  17. margin: 3px 0px 3px 0px;
  18. }
  19. form.rounded input:not([type=range]),
  20. form.rounded textarea,
  21. form.rounded select {
  22. width: 94%;
  23. padding: 1.0% 3% ;
  24. }
  25. form.rounded input:not([type=range]):first-of-type,
  26. form.rounded textarea:first-of-type,
  27. form.rounded select:first-of-type {
  28. -webkit-border-radius: 2px 2px 0px 0px;
  29. -moz-border-radius: 2px 2px 0px 0px;
  30. border-radius: 2px 2px 0px 0px;
  31. -webkit-background-clip: padding-box;
  32. -moz-background-clip: padding;
  33. background-clip: padding-box;
  34. }
  35. form.rounded input:not([type=range]):last-of-type,
  36. form.rounded textarea:last-of-type,
  37. form.rounded select:last-of-type {
  38. -webkit-border-radius: 0px 0px 2px 2px;
  39. -moz-border-radius: 0px 0px 2px 2px;
  40. border-radius: 0px 0px 2px 2px;
  41. -webkit-background-clip: padding-box;
  42. -moz-background-clip: padding;
  43. background-clip: padding-box;
  44. }
  45. form label:not(.select) {
  46. font-size: 13px;
  47. margin-bottom: 3px;
  48. display: block;
  49. }
  50. form input,
  51. form textarea,
  52. form select,
  53. form .progress {
  54. margin-bottom: 8px;
  55. }
  56. form input:not([type=range]),
  57. form textarea,
  58. form select {
  59. display: block;
  60. width: 94%;
  61. padding: 0 3%;
  62. height: 30px;
  63. font-size: 15px;
  64. line-height: 16px;
  65. font-weight: bold;
  66. -webkit-appearance: none;
  67. -webkit-user-select: text;
  68. -webkit-font-smoothing: antialiased;
  69. }
  70. form textarea {
  71. padding-top: 1.5%;
  72. min-height: 48px;
  73. }
  74. form input[type=search] {
  75. width: 86%;
  76. display: inline-block;
  77. }
  78. form input[type=search] + .button {
  79. float: right;
  80. padding: 0px;
  81. width: 11%;
  82. height: 30px;
  83. }
  84. form input[type=search] + .button .icon {
  85. top: -3px;
  86. float: none;
  87. }
  88. form select {
  89. width: 100%;
  90. height: 30px;
  91. }
  92. form label.select {
  93. position: relative;
  94. display: inline-block;
  95. width: 100%;
  96. }
  97. form .select:after {
  98. text-align: center;
  99. position: absolute;
  100. top: 3px;
  101. right: 0;
  102. bottom: 0;
  103. height: 30px;
  104. width: 30px;
  105. content: "▼";
  106. pointer-events: none;
  107. line-height: 33px;
  108. }
  109. form .no-pointer-events .select:after {
  110. content: none;
  111. }
  112. form input[type=range] {
  113. -webkit-appearance: none;
  114. outline: none;
  115. }
  116. form input[type=range]:not(.checkbox) {
  117. height: 12px;
  118. width: 100%;
  119. padding: 0px;
  120. margin-top: 2px;
  121. border: 0;
  122. cursor: ew-resize;
  123. }
  124. form input[type=range]:not(.checkbox)::-webkit-slider-thumb {
  125. top: -1px;
  126. }
  127. form input[type=range].checkbox {
  128. width: 70px;
  129. height: 30px;
  130. padding: 1px 2px;
  131. font-family: 'lungojsicon';
  132. }
  133. form input[type=range].checkbox:after {
  134. content: "\0055";
  135. position: relative;
  136. float: right;
  137. top: -23px;
  138. padding: 0 8px;
  139. font-size: 1.5em;
  140. }
  141. form input[type=range].checkbox.active:after {
  142. float: left;
  143. content: "\0051";
  144. font-weight: bold;
  145. font-size: 1.6em;
  146. }
  147. form input[type=range]::-webkit-slider-thumb {
  148. -webkit-appearance: none;
  149. width: 30px;
  150. height: 24px;
  151. border-radius: 2px;
  152. position: relative;
  153. margin: 2px 2px 2px 2px;
  154. border: none;
  155. }
  156. form input[type=range]::-webkit-slider-thumb::after {
  157. width: 12px;
  158. height: 12px;
  159. display: block;
  160. content: "";
  161. position: relative;
  162. border-radius: 8px;
  163. z-index: 9;
  164. top: 6px;
  165. left: 9px;
  166. }
  167. form .progress {
  168. width: 100%;
  169. margin-bottom: 8px;
  170. }
  171. form .progress .labels {
  172. font-size: 1.0em;
  173. display: block;
  174. }
  175. form .progress .labels span:last-child {
  176. float: right;
  177. }
  178. form .progress .bar {
  179. height: 12px;
  180. line-height: 12px;
  181. display: block;
  182. }
  183. form .progress .bar .value {
  184. display: block;
  185. height: inherit;
  186. width: 0%;
  187. -webkit-transition: width 500ms cubic-bezier(0.39, 0.575, 0.565, 1);
  188. -moz-transition: width 500ms cubic-bezier(0.39, 0.575, 0.565, 1);
  189. -ms-transition: width 500ms cubic-bezier(0.39, 0.575, 0.565, 1);
  190. -o-transition: width 500ms cubic-bezier(0.39, 0.575, 0.565, 1);
  191. transition: width 500ms cubic-bezier(0.39, 0.575, 0.565, 1);
  192. }
  193. form .progress .bar .value .label {
  194. float: right;
  195. margin-right: 4px;
  196. font-size: 0.75em;
  197. }
  198. @media screen and (-webkit-min-device-pixel-ratio: 0) {
  199. form .custom-select select {
  200. padding-right: 30px;
  201. }
  202. }