Lungo.widgets.form.css 5.6 KB

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