Lungo.widgets.form.less 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. /**
  2. * Stylesheet
  3. *
  4. * @namespace LUNGO.Widgets
  5. * @class Form
  6. *
  7. * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  8. */
  9. @import "constants.less";
  10. @import "mixins.less";
  11. form, .form { }
  12. label {
  13. font-size: 0.9em;
  14. line-height: 29px;
  15. }
  16. input:not([type=checkbox]), textarea, select {
  17. display: inline-block;
  18. padding: 5px 0 5px 5px;
  19. width: 97%;
  20. outline: none;
  21. font-size: 15px;
  22. line-height: 15px;
  23. font-weight: bold;
  24. -webkit-appearance: none;
  25. -webkit-user-select: text;
  26. margin: 0 0 6px;
  27. }
  28. input:not([type=checkbox]), textarea, select {
  29. display: inline-block;
  30. padding: 5px 0 5px 5px;
  31. width: 97%;
  32. outline: none;
  33. font-size: 15px;
  34. line-height: 15px;
  35. font-weight: bold;
  36. -webkit-appearance: none;
  37. -webkit-user-select: text;
  38. margin: 0 0 6px;
  39. }
  40. .big {
  41. width: 99%;
  42. height: 190px;
  43. .border-radius(0px);
  44. line-height: 22px;
  45. //padding: 0px;
  46. }
  47. /* @group search */
  48. input[type=search] {
  49. width: 86%;
  50. & + .button {
  51. float: right;
  52. padding: 0px;
  53. width: 32px;
  54. height: 30px;
  55. & .icon {
  56. font-size: 22px !important;
  57. line-height: 30px;
  58. }
  59. }
  60. }
  61. /* @end */
  62. /* @group select */
  63. select {
  64. width: 100%;
  65. height: 29px;
  66. }
  67. label.select {
  68. position: relative;
  69. display: inline-block;
  70. width: 100%;
  71. }
  72. .select:after {
  73. text-align: center;
  74. position: absolute;
  75. top: 0;
  76. right: 0;
  77. bottom: 0;
  78. height:29px;
  79. width: 29px;
  80. content: "▼";
  81. pointer-events:none;
  82. line-height: 31px;
  83. }
  84. .no-pointer-events .select:after {
  85. content: none;
  86. }
  87. /* @end */
  88. /* @group switch */
  89. input[type="checkbox"], input[type="radio"]{
  90. width: 82px;
  91. height: 29px;
  92. z-index: 2;
  93. }
  94. input[type="checkbox"] + span::after,
  95. input[type="radio"] + span::after {
  96. content: "OFF";
  97. }
  98. input[type="checkbox"]:checked + span::after,
  99. input[type="radio"]:checked + span::after {
  100. content: "ON";
  101. }
  102. input[type="checkbox"] + span,
  103. input[type="radio"] + span,
  104. input[type="checkbox"] + span::before,
  105. input[type="radio"] + span::before,
  106. input[type="checkbox"] + span::after,
  107. input[type="radio"] + span::after {
  108. display: inline-block;
  109. }
  110. input[type="checkbox"] + span::before,
  111. input[type="radio"] + span::before,
  112. input[type="checkbox"] + span::after,
  113. input[type="radio"] + span::after,
  114. input[type="checkbox"]:checked + span::before,
  115. input[type="radio"]:checked + span::before,
  116. input[type="checkbox"]:checked + span::after,
  117. input[type="radio"]:checked + span::after {
  118. top: 0;
  119. }
  120. input[type="checkbox"] + span::after,
  121. input[type="radio"] + span::after,
  122. input[type="checkbox"]:checked + span::before,
  123. input[type="radio"]:checked + span::before {
  124. right: 0;
  125. }
  126. input[type="checkbox"] + span::before,
  127. input[type="radio"] + span::before,
  128. input[type="checkbox"]:checked + span::after,
  129. input[type="radio"]:checked + span::after {
  130. left: 0;
  131. }
  132. input[type="checkbox"],
  133. input[type="radio"],
  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. position: absolute;
  139. }
  140. input[type="checkbox"],
  141. input[type="radio"] {
  142. -webkit-opacity: 0;
  143. opacity: 0;
  144. }
  145. input[type="checkbox"] + span,
  146. input[type="radio"] + span {
  147. width: 82px;
  148. height: 27px;
  149. position: relative;
  150. font-size: 11px;
  151. line-height: 29px;
  152. font-weight: bold;
  153. text-transform: uppercase;
  154. text-indent: -9999px;
  155. }
  156. input[type="checkbox"] + span::before,
  157. input[type="radio"] + span::before {
  158. content: "";
  159. width: 41px;
  160. height: 27px;
  161. }
  162. input[type="checkbox"] + span::after,
  163. input[type="radio"] + span::after {
  164. text-indent: 0;
  165. width: 41px;
  166. height: 27px;
  167. text-align: center;
  168. }
  169. input[type="checkbox"]:checked + span::before,
  170. input[type="radio"]:checked + span::before {
  171. left: auto;
  172. }
  173. input[type="checkbox"]:checked + span::after,
  174. input[type="radio"]:checked + span::after {
  175. height: 27px;
  176. }
  177. /* @end */
  178. /* @group range */
  179. input[type="range"] {
  180. -webkit-appearance: none;
  181. height: 15px;
  182. width: 100%;
  183. outline: none;
  184. position: relative;
  185. padding: 0px;
  186. margin: 0px;
  187. border: 0;
  188. cursor: ew-resize;
  189. &::-webkit-slider-thumb {
  190. -webkit-appearance: none;
  191. position: relative;
  192. z-index: 1;
  193. width: 24px;
  194. height: 24px;
  195. border-radius: 12px;
  196. }
  197. }
  198. /* @end */
  199. /* @group progress */
  200. .progress {
  201. width: 100%;
  202. margin-bottom: 8px;
  203. .labels {
  204. display: block;
  205. & span:last-child { float: right; }
  206. }
  207. & .bar {
  208. height: 15px;
  209. line-height: 16px;
  210. display: block;
  211. & .value {
  212. display:block;
  213. height: inherit;
  214. width: 0%;
  215. -webkit-transition: width 500ms @defaultTrasition;
  216. }
  217. }
  218. }
  219. .big .progress .bar {
  220. height: 29px;
  221. line-height: 30px;
  222. }
  223. /* @end */
  224. @media screen and (-webkit-min-device-pixel-ratio:0) {
  225. .custom-select select {padding-right:30px;}
  226. }