Lungo.widgets.form.less 4.3 KB

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