Lungo.widgets.form.less 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  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. position: relative;
  12. margin: 8px;
  13. font-size: 1.15em;
  14. font-weight: bold;
  15. }
  16. input:not([type=checkbox]), textarea, select {
  17. display: inline-block;
  18. padding: 6px 6px 5px;
  19. width: 95%;
  20. margin-bottom: 8px;
  21. outline: none;
  22. -webkit-appearance: none;
  23. font-size: 1.0em;
  24. font-weight: bold;
  25. line-height: 1.25em;
  26. }
  27. input[type=search] {
  28. width: 100%;
  29. z-index: 1;
  30. margin: 0px;
  31. }
  32. input[type=search]:before {
  33. content:"hola";
  34. }
  35. select{
  36. width: 100%;
  37. }
  38. label.select {
  39. position: relative;
  40. display: inline-block;
  41. width: 100%;
  42. }
  43. .select:after {
  44. padding: 0 7px;
  45. position: absolute;
  46. top: 0;
  47. right: 0;
  48. bottom: 0;
  49. height:30px;
  50. content: "▼";
  51. pointer-events:none;
  52. font-size: 60%;
  53. line-height: 32px;
  54. }
  55. .no-pointer-events .select:after {
  56. content: none;
  57. }
  58. input[type="checkbox"], input[type="radio"]{
  59. width: 74px;
  60. float: left;
  61. z-index: 1;
  62. }
  63. input[type="checkbox"] + span::after,
  64. input[type="radio"] + span::after {
  65. content: "off";
  66. }
  67. input[type="checkbox"]:checked + span::after,
  68. input[type="radio"]:checked + span::after {
  69. content: "on";
  70. }
  71. .iphone-toggle-buttons {
  72. -moz-user-select: none;
  73. -webkit-user-select: none;
  74. user-select: none;
  75. }
  76. .iphone-toggle-buttons {
  77. margin: 4px 0;
  78. }
  79. input[type="checkbox"] + span,
  80. input[type="radio"] + span,
  81. input[type="checkbox"] + span::before,
  82. input[type="radio"] + span::before,
  83. input[type="checkbox"] + span::after,
  84. input[type="radio"] + span::after {
  85. -moz-border-radius: 16px;
  86. -webkit-border-radius: 16px;
  87. border-radius: 16px;
  88. display: inline-block;
  89. }
  90. input[type="checkbox"] + span::before,
  91. input[type="radio"] + span::before,
  92. input[type="checkbox"] + span::after,
  93. input[type="radio"] + span::after,
  94. input[type="checkbox"]:checked + span::before,
  95. input[type="radio"]:checked + span::before,
  96. input[type="checkbox"]:checked + span::after,
  97. input[type="radio"]:checked + span::after {
  98. top: 0;
  99. }
  100. input[type="checkbox"] + span::after,
  101. input[type="radio"] + span::after,
  102. input[type="checkbox"]:checked + span::before,
  103. input[type="radio"]:checked + span::before {
  104. right: 0;
  105. }
  106. input[type="checkbox"] + span::before,
  107. input[type="radio"] + span::before,
  108. input[type="checkbox"]:checked + span::after,
  109. input[type="radio"]:checked + span::after {
  110. left: 0;
  111. }
  112. input[type="checkbox"],
  113. input[type="radio"],
  114. input[type="checkbox"] + span::before,
  115. input[type="radio"] + span::before,
  116. input[type="checkbox"] + span::after,
  117. input[type="radio"] + span::after {
  118. position: absolute;
  119. }
  120. input[type="checkbox"],
  121. input[type="radio"] {
  122. filter: alpha(opacity=0);
  123. -moz-opacity: 0;
  124. -webkit-opacity: 0;
  125. opacity: 0;
  126. }
  127. input[type="checkbox"] + span,
  128. input[type="radio"] + span {
  129. width: 74px;
  130. margin-bottom: 8px;
  131. height: 30px;
  132. font: bold 14px/30px Arial, Sans-serif;
  133. color: #8c8c8c;
  134. text-transform: uppercase;
  135. border: solid 1px #bcbbbb;
  136. background: #c8c8c8 -webkit-gradient(linear, left top, left bottom, color-stop(0, #c8c8c8), color-stop(1, #f3f3f3));
  137. position: relative;
  138. text-indent: -9999px;
  139. }
  140. input[type="checkbox"] + span::before,
  141. input[type="radio"] + span::before {
  142. content: "";
  143. width: 29px;
  144. height: 29px;
  145. border-top: solid 1px #fff;
  146. border-right: solid 1px #bebebe;
  147. background: #cfcfcf -webkit-gradient(linear, left top, left bottom, color-stop(0, #cfcfcf), color-stop(1, #f9f9f9));
  148. .box-shadow(1px 0 1px #bebebe);
  149. }
  150. input[type="checkbox"] + span::after,
  151. input[type="radio"] + span::after {
  152. text-indent: 0;
  153. width: 56px;
  154. height: 32px;
  155. text-align: center;
  156. }
  157. input[type="checkbox"]:checked + span, input[type="radio"]:checked + span {
  158. background: #5d96ea -webkit-gradient(linear, left top, left bottom, color-stop(0, #1b45bd), color-stop(1, #5d96ea));
  159. color: #fff;
  160. text-shadow: -1px -1px #0d2046;
  161. }
  162. input[type="checkbox"]:checked + span::before,
  163. input[type="radio"]:checked + span::before {
  164. left: auto;
  165. -webkit-box-shadow: -2px 0 1px #3a5e91;
  166. .box-shadow(-2px 0 1px #3a5e91);
  167. }
  168. input[type="checkbox"]:checked + span::after,
  169. input[type="radio"]:checked + span::after {
  170. border-top: solid 1px #0f2a4f;
  171. border-bottom: solid 1px #0f2a4f;
  172. border-left: solid 1px #2c5496;
  173. height: 30px;
  174. top: -1px;
  175. left: -1px;
  176. .border-radius(16px 0 0 16px);
  177. }
  178. @media screen and (-webkit-min-device-pixel-ratio:0) {
  179. .custom-select select {padding-right:30px;}
  180. }