Lungo.widgets.form.css 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  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. label {
  12. font-size: 0.85em;
  13. }
  14. input:not([type=checkbox]),
  15. textarea,
  16. select {
  17. display: block;
  18. width: 96%;
  19. margin: 0 0 6px;
  20. padding: 0.5% 2% ;
  21. height: 29px;
  22. font-size: 14px;
  23. font-weight: bold;
  24. -webkit-appearance: none;
  25. -webkit-user-select: text;
  26. -webkit-font-smoothing: antialiased;
  27. }
  28. input:not([type=checkbox]).rounded,
  29. textarea.rounded,
  30. select.rounded {
  31. margin: 0px;
  32. width: 94%;
  33. padding: 1.0% 3% ;
  34. }
  35. input:not([type=checkbox]).rounded:first-of-type,
  36. textarea.rounded:first-of-type,
  37. select.rounded:first-of-type {
  38. -webkit-border-radius: 8px 8px 0px 0px;
  39. -moz-border-radius: 8px 8px 0px 0px;
  40. border-radius: 8px 8px 0px 0px;
  41. -webkit-background-clip: padding-box;
  42. -moz-background-clip: padding;
  43. background-clip: padding-box;
  44. -webkit-border-radius: 8px 8px 0px 0px;
  45. -moz-border-radius: 8px 8px 0px 0px;
  46. border-radius: 8px 8px 0px 0px;
  47. -webkit-background-clip: padding-box;
  48. -moz-background-clip: padding;
  49. background-clip: padding-box;
  50. }
  51. input:not([type=checkbox]).rounded:last-of-type,
  52. textarea.rounded:last-of-type,
  53. select.rounded:last-of-type {
  54. -webkit-border-radius: 0px 0px 8px 8px;
  55. -moz-border-radius: 0px 0px 8px 8px;
  56. border-radius: 0px 0px 8px 8px;
  57. -webkit-background-clip: padding-box;
  58. -moz-background-clip: padding;
  59. background-clip: padding-box;
  60. -webkit-border-radius: 0px 0px 8px 8px;
  61. -moz-border-radius: 0px 0px 8px 8px;
  62. border-radius: 0px 0px 8px 8px;
  63. -webkit-background-clip: padding-box;
  64. -moz-background-clip: padding;
  65. background-clip: padding-box;
  66. }
  67. textarea {
  68. min-height: 48px;
  69. }
  70. /* @group search */
  71. input[type=search] {
  72. width: 86%;
  73. }
  74. input[type=search] + .button {
  75. float: right;
  76. padding: 0px;
  77. width: 32px;
  78. height: 30px;
  79. }
  80. input[type=search] + .button .icon {
  81. font-size: 22px !important;
  82. line-height: 30px;
  83. }
  84. /* @end */
  85. /* @group select */
  86. select {
  87. width: 100%;
  88. height: 29px;
  89. }
  90. label.select {
  91. position: relative;
  92. display: inline-block;
  93. width: 100%;
  94. }
  95. .select:after {
  96. text-align: center;
  97. position: absolute;
  98. top: 0;
  99. right: 0;
  100. bottom: 0;
  101. height: 29px;
  102. width: 29px;
  103. content: "▼";
  104. pointer-events: none;
  105. line-height: 31px;
  106. }
  107. .no-pointer-events .select:after {
  108. content: none;
  109. }
  110. /* @end */
  111. /* @group switch */
  112. input[type="checkbox"],
  113. input[type="radio"] {
  114. width: 82px;
  115. height: 29px;
  116. z-index: 2;
  117. }
  118. input[type="checkbox"] + span::after,
  119. input[type="radio"] + span::after {
  120. content: "OFF";
  121. }
  122. input[type="checkbox"]:checked + span::after,
  123. input[type="radio"]:checked + span::after {
  124. content: "ON";
  125. }
  126. input[type="checkbox"] + span,
  127. input[type="radio"] + span,
  128. input[type="checkbox"] + span::before,
  129. input[type="radio"] + span::before,
  130. input[type="checkbox"] + span::after,
  131. input[type="radio"] + span::after {
  132. display: inline-block;
  133. }
  134. input[type="checkbox"] + span::before,
  135. input[type="radio"] + span::before,
  136. input[type="checkbox"] + span::after,
  137. input[type="radio"] + span::after,
  138. input[type="checkbox"]:checked + span::before,
  139. input[type="radio"]:checked + span::before,
  140. input[type="checkbox"]:checked + span::after,
  141. input[type="radio"]:checked + span::after {
  142. top: 0;
  143. }
  144. input[type="checkbox"] + span::after,
  145. input[type="radio"] + span::after,
  146. input[type="checkbox"]:checked + span::before,
  147. input[type="radio"]:checked + span::before {
  148. right: 0;
  149. }
  150. input[type="checkbox"] + span::before,
  151. input[type="radio"] + span::before,
  152. input[type="checkbox"]:checked + span::after,
  153. input[type="radio"]:checked + span::after {
  154. left: 0;
  155. }
  156. input[type="checkbox"],
  157. input[type="radio"],
  158. input[type="checkbox"] + span::before,
  159. input[type="radio"] + span::before,
  160. input[type="checkbox"] + span::after,
  161. input[type="radio"] + span::after {
  162. position: absolute;
  163. }
  164. input[type="checkbox"],
  165. input[type="radio"] {
  166. -webkit-opacity: 0;
  167. opacity: 0;
  168. }
  169. input[type="checkbox"] + span,
  170. input[type="radio"] + span {
  171. width: 82px;
  172. height: 27px;
  173. position: relative;
  174. font-size: 11px;
  175. line-height: 29px;
  176. font-weight: bold;
  177. text-transform: uppercase;
  178. text-indent: -9999px;
  179. }
  180. input[type="checkbox"] + span::before,
  181. input[type="radio"] + span::before {
  182. content: "";
  183. width: 41px;
  184. height: 27px;
  185. }
  186. input[type="checkbox"] + span::after,
  187. input[type="radio"] + span::after {
  188. text-indent: 0;
  189. width: 41px;
  190. height: 27px;
  191. text-align: center;
  192. }
  193. input[type="checkbox"]:checked + span::before,
  194. input[type="radio"]:checked + span::before {
  195. left: auto;
  196. }
  197. input[type="checkbox"]:checked + span::after,
  198. input[type="radio"]:checked + span::after {
  199. height: 27px;
  200. }
  201. /* @end */
  202. /* @group range */
  203. input[type="range"] {
  204. -webkit-appearance: none;
  205. height: 15px;
  206. width: 100%;
  207. outline: none;
  208. position: relative;
  209. padding: 0px;
  210. margin: 0px;
  211. border: 0;
  212. cursor: ew-resize;
  213. }
  214. input[type="range"]::-webkit-slider-thumb {
  215. -webkit-appearance: none;
  216. position: relative;
  217. z-index: 1;
  218. top: -1px;
  219. width: 24px;
  220. height: 24px;
  221. }
  222. /* @end */
  223. /* @group progress */
  224. .progress {
  225. width: 100%;
  226. margin-bottom: 8px;
  227. }
  228. .progress .labels {
  229. font-size: 1.0em;
  230. display: block;
  231. }
  232. .progress .labels span:last-child {
  233. float: right;
  234. }
  235. .progress .bar {
  236. height: 15px;
  237. line-height: 15px;
  238. display: block;
  239. }
  240. .progress .bar .value {
  241. display: block;
  242. height: inherit;
  243. width: 0%;
  244. -webkit-transition: width 500ms cubic-bezier(0.39, 0.575, 0.565, 1);
  245. }
  246. .progress .bar .value .label {
  247. float: right;
  248. margin-right: 4px;
  249. font-size: 0.75em;
  250. }
  251. .big .progress .bar {
  252. height: 29px;
  253. line-height: 30px;
  254. }
  255. /* @end */
  256. @media screen and (-webkit-min-device-pixel-ratio: 0) {
  257. .custom-select select {
  258. padding-right: 30px;
  259. }
  260. }