Lungo.widgets.form.less 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  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. .form, form {
  11. width: inherit !important;
  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;
  20. width: 95%;
  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. }
  48. label.select {
  49. position: relative;
  50. display: inline-block;
  51. width: 100%;
  52. padding-top: 2px;
  53. }
  54. .select:after {
  55. text-align: center;
  56. position: absolute;
  57. top: 0;
  58. right: 0;
  59. bottom: 0;
  60. height:29px;
  61. width: 29px;
  62. content: "▼";
  63. pointer-events:none;
  64. line-height: 32px;
  65. margin-top: 2px;
  66. }
  67. .no-pointer-events .select:after {
  68. content: none;
  69. }
  70. /* @group Switch */
  71. input[type="checkbox"], input[type="radio"]{
  72. width: 82px;
  73. height: 27px;
  74. z-index: 2;
  75. }
  76. input[type="checkbox"] + span::after,
  77. input[type="radio"] + span::after {
  78. content: "OFF";
  79. }
  80. input[type="checkbox"]:checked + span::after,
  81. input[type="radio"]:checked + span::after {
  82. content: "ON";
  83. }
  84. input[type="checkbox"] + span,
  85. input[type="radio"] + span,
  86. input[type="checkbox"] + span::before,
  87. input[type="radio"] + span::before,
  88. input[type="checkbox"] + span::after,
  89. input[type="radio"] + span::after {
  90. display: inline-block;
  91. }
  92. input[type="checkbox"] + span::before,
  93. input[type="radio"] + span::before,
  94. input[type="checkbox"] + span::after,
  95. input[type="radio"] + span::after,
  96. input[type="checkbox"]:checked + span::before,
  97. input[type="radio"]:checked + span::before,
  98. input[type="checkbox"]:checked + span::after,
  99. input[type="radio"]:checked + span::after {
  100. top: 0;
  101. }
  102. input[type="checkbox"] + span::after,
  103. input[type="radio"] + span::after,
  104. input[type="checkbox"]:checked + span::before,
  105. input[type="radio"]:checked + span::before {
  106. right: 0;
  107. }
  108. input[type="checkbox"] + span::before,
  109. input[type="radio"] + span::before,
  110. input[type="checkbox"]:checked + span::after,
  111. input[type="radio"]:checked + span::after {
  112. left: 0;
  113. }
  114. input[type="checkbox"],
  115. input[type="radio"],
  116. input[type="checkbox"] + span::before,
  117. input[type="radio"] + span::before,
  118. input[type="checkbox"] + span::after,
  119. input[type="radio"] + span::after {
  120. position: absolute;
  121. }
  122. input[type="checkbox"],
  123. input[type="radio"] {
  124. -webkit-opacity: 0;
  125. opacity: 0;
  126. }
  127. input[type="checkbox"] + span,
  128. input[type="radio"] + span {
  129. width: 82px;
  130. height:27px;
  131. position: relative;
  132. font-size: 11px;
  133. line-height: 29px;
  134. font-weight: bold;
  135. text-transform: uppercase;
  136. text-indent: -9999px;
  137. }
  138. input[type="checkbox"] + span::before,
  139. input[type="radio"] + span::before {
  140. content: "";
  141. width: 41px;
  142. height: 27px;
  143. }
  144. input[type="checkbox"] + span::after,
  145. input[type="radio"] + span::after {
  146. text-indent: 0;
  147. width: 41px;
  148. height: 27px;
  149. text-align: center;
  150. box-shadow: 0px 1px 0px #fff, 0px 2px 0px #d2d2d2;
  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 slider */
  162. /*
  163. input[type="range"] {
  164. -webkit-appearance: none;
  165. outline: none;
  166. height: 3px;
  167. border-radius: 1px;
  168. position: relative;
  169. padding: 0px;
  170. margin: 0px;
  171. background-color: #c7c7c7;
  172. border: 0;
  173. cursor: ew-resize;
  174. }
  175. input[type="range"]:active { background-color: #34b7dc; }
  176. input[type="range"]::-webkit-slider-thumb {
  177. -webkit-appearance: none;
  178. position: relative;
  179. z-index: 1;
  180. width: 12px;
  181. height: 12px;
  182. border-radius: 6px;
  183. background: #34b7dc;
  184. box-shadow: inset 0px 0px 1px rgba(0,0,0,0.5);
  185. }
  186. input[type="range"]:hover::-webkit-slider-thumb,
  187. input[type="range"]:active::-webkit-slider-thumb {
  188. box-shadow: 0px 0px 8px #34b7dc;
  189. }
  190. */
  191. /* @end */
  192. @media screen and (-webkit-min-device-pixel-ratio:0) {
  193. .custom-select select {padding-right:30px;}
  194. }