Lungo.widgets.form.less 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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. @form-input-height: 30px;
  11. @rounded-radius: 2px;
  12. @range_progress_height: 12px;
  13. form {
  14. &.wrapper input:not([type=checkbox]), textarea, select {
  15. margin: 3px 0px 3px 0px;
  16. }
  17. &.rounded {
  18. & input:not([type=range]), textarea, select {
  19. width: 94%;
  20. padding: 1.0% 3% ;
  21. &:first-of-type { .border-radius(@rounded-radius @rounded-radius 0px 0px); }
  22. &:last-of-type { .border-radius(0px 0px @rounded-radius @rounded-radius); }
  23. }
  24. }
  25. label:not(.select) {
  26. font-size: 13px;
  27. margin-bottom: 3px;
  28. display: block; }
  29. input, textarea, select, .progress {
  30. margin-bottom: 8px; }
  31. input:not([type=range]), textarea, select {
  32. display: block;
  33. width: 94%;
  34. padding: 0 3%;
  35. height: @form-input-height;
  36. font-size: 15px;
  37. line-height: 16px;
  38. font-weight: bold;
  39. -webkit-appearance: none;
  40. -webkit-user-select: text;
  41. -webkit-font-smoothing: antialiased;
  42. }
  43. textarea {
  44. padding-top: 1.5%;
  45. min-height: 48px; }
  46. /* @group search */
  47. input[type=search] {
  48. width: 86%;
  49. display: inline-block;
  50. & + .button {
  51. float: right;
  52. padding: 0px;
  53. width: 11%;
  54. height: @form-input-height;
  55. & .icon{
  56. top: -3px;
  57. float: none;
  58. }
  59. }
  60. }
  61. select {
  62. width: 100%;
  63. height: @form-input-height; }
  64. label.select {
  65. position: relative;
  66. display: inline-block;
  67. width: 100%; }
  68. .select:after {
  69. text-align: center;
  70. position: absolute;
  71. top: 3px;
  72. right: 0;
  73. bottom: 0;
  74. height: @form-input-height;
  75. width: @form-input-height;
  76. content: "▼";
  77. pointer-events:none;
  78. line-height: 33px; }
  79. .no-pointer-events .select:after {
  80. content: none;
  81. }
  82. input[type=range] {
  83. -webkit-appearance: none;
  84. outline: none;
  85. &:not(.checkbox) {
  86. height: @range_progress_height;
  87. width: 100%;
  88. padding: 0px;
  89. margin-top: 2px;
  90. border: 0;
  91. cursor: ew-resize;
  92. &::-webkit-slider-thumb { top: -1px; }
  93. }
  94. &.checkbox {
  95. width:70px;
  96. height: 30px;
  97. padding: 1px 2px;
  98. font-family:'lungojsicon';
  99. &:after {
  100. content: "\0055";
  101. position: relative;
  102. float: right;
  103. top: -23px;
  104. padding: 0 8px;
  105. font-size: 1.5em; }
  106. &.active:after {
  107. float: left;
  108. content: "\0051";
  109. font-weight: bold;
  110. font-size: 1.6em; }
  111. }
  112. &::-webkit-slider-thumb {
  113. -webkit-appearance: none;
  114. width: 30px;
  115. height: 24px;
  116. border-radius: 2px;
  117. position:relative;
  118. margin:2px 2px 2px 2px;
  119. border: none; }
  120. &::-webkit-slider-thumb::after {
  121. width:12px;
  122. height:12px;
  123. display:block;
  124. content:"";
  125. position:relative;
  126. border-radius: 8px;
  127. z-index:9;
  128. top:6px;
  129. left:9px; }
  130. }
  131. .progress {
  132. width: 100%;
  133. margin-bottom: 8px;
  134. .labels {
  135. font-size: 1.0em;
  136. display: block;
  137. & span:last-child { float: right; }
  138. }
  139. & .bar {
  140. height: @range_progress_height;
  141. line-height: @range_progress_height;
  142. display: block;
  143. & .value {
  144. display:block;
  145. height: inherit;
  146. width: 0%;
  147. .transition( width 500ms @defaultTrasition);
  148. & .label {
  149. float: right;
  150. margin-right: 4px;
  151. font-size: 0.75em; }
  152. }
  153. }
  154. }
  155. @media screen and (-webkit-min-device-pixel-ratio:0) {
  156. .custom-select select {padding-right:30px;}
  157. }
  158. }