app.components.less 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. .i-switch{
  2. cursor: pointer;
  3. position: relative;
  4. display: inline-block;
  5. width: @switch-width;
  6. height: @switch-height;
  7. border-radius: 30px;
  8. background-color: @brand-success;
  9. margin: 0;
  10. input{
  11. position: absolute;
  12. .opacity(0);
  13. &:checked{
  14. + i{
  15. &:before{
  16. top: 50%;
  17. bottom: 50%;
  18. left: 50%;
  19. right: 5px;
  20. border-width: 0;
  21. border-radius: 5px;
  22. }
  23. &:after{
  24. margin-left: @switch-width - @switch-height + 1;
  25. }
  26. }
  27. }
  28. }
  29. i{
  30. &:before{
  31. content: "";
  32. position: absolute;
  33. top: -1px;
  34. bottom: -1px;
  35. left: -1px;
  36. right: -1px;
  37. background-color: #fff;
  38. border: 1px solid #f0f0f0;
  39. border-radius: 30px;
  40. .transition(all 0.2s);
  41. }
  42. &:after{
  43. content: "";
  44. position: absolute;
  45. background-color: #fff;
  46. width: @switch-height - 2;
  47. top: 1px;
  48. bottom: 1px;
  49. border-radius: 50%;
  50. .box-shadow(1px 1px 3px rgba(0, 0, 0, 0.25));
  51. .transition(margin-left 0.3s);
  52. }
  53. }
  54. }
  55. .i-switch-md{
  56. width: @switch-md-width;
  57. height: @switch-md-height;
  58. input{
  59. &:checked{
  60. + i{
  61. &:after{
  62. margin-left: @switch-md-width - @switch-md-height + 1;
  63. }
  64. }
  65. }
  66. }
  67. i{
  68. &:after{
  69. width: @switch-md-height - 2;
  70. }
  71. }
  72. }
  73. .i-switch-lg{
  74. width: @switch-lg-width;
  75. height: @switch-lg-height;
  76. input{
  77. &:checked{
  78. + i{
  79. &:after{
  80. margin-left: @switch-lg-width - @switch-lg-height + 1;
  81. }
  82. }
  83. }
  84. }
  85. i{
  86. &:after{
  87. width: @switch-lg-height - 2;
  88. }
  89. }
  90. }
  91. .i-checks{
  92. padding-left: 20px;
  93. cursor: pointer;
  94. input{
  95. opacity: 0;
  96. position: absolute;
  97. margin-left: -20px;
  98. &:checked + i{
  99. border-color: @brand-info;
  100. &:before{
  101. left: 4px;
  102. top: 4px;
  103. width: 10px;
  104. height: 10px;
  105. background-color: @brand-info;
  106. }
  107. }
  108. &:checked + span .active{
  109. display: inherit;
  110. }
  111. &[type="radio"] + i{
  112. &,
  113. &:before{
  114. border-radius: 50%;
  115. }
  116. }
  117. &[type="checkbox"]:checked + i:before{
  118. }
  119. &[type="radio"]:checked + i:before{
  120. }
  121. &[disabled],
  122. fieldset[disabled] & {
  123. & + i{
  124. border-color: lighten(@input-border, 5%);
  125. &:before{
  126. background-color: lighten(@input-border, 5%);
  127. }
  128. }
  129. }
  130. }
  131. > i{
  132. width: 20px;
  133. height: 20px;
  134. line-height: 1;
  135. border: 1px solid @input-border;
  136. background-color: #fff;
  137. margin-left: -20px;
  138. margin-top: -2px;
  139. display: inline-block;
  140. vertical-align: middle;
  141. margin-right: 4px;
  142. position: relative;
  143. &:before{
  144. content:"";
  145. position: absolute;
  146. left: 50%;
  147. top: 50%;
  148. width: 0px;
  149. height: 0px;
  150. background-color: transparent;
  151. .transition(all 0.2s);
  152. }
  153. }
  154. > span{
  155. margin-left: -20px;
  156. .active{
  157. display: none;
  158. }
  159. }
  160. }
  161. .i-checks-sm{
  162. input{
  163. &:checked + i{
  164. &:before{
  165. left: 3px;
  166. top: 3px;
  167. width: 8px;
  168. height: 8px;
  169. }
  170. }
  171. }
  172. > i{
  173. width: 16px;
  174. height: 16px;
  175. margin-left: -18px;
  176. margin-right: 6px;
  177. }
  178. }
  179. .i-checks-lg{
  180. input{
  181. &:checked + i{
  182. &:before{
  183. left: 8px;
  184. top: 8px;
  185. width: 12px;
  186. height: 12px;
  187. }
  188. }
  189. }
  190. > i{
  191. width: 30px;
  192. height: 30px;
  193. }
  194. }
  195. // ui.bootstrap datepicker
  196. .datepicker{margin: 0 5px}
  197. .datepicker .btn-default{border-width: 0;box-shadow: none;}
  198. .datepicker .btn[disabled]{opacity: 0.4}
  199. .datepicker .btn-info .text-info{color: #fff !important;}