Lungo.widgets.form.css 4.1 KB

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