Lungo.widgets.form.less 4.3 KB

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