_form.scss 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. .form-control {
  2. border-color: $input-border-color;
  3. color: $font-color;
  4. padding: .5rem .7rem;
  5. font-size: .9rem;
  6. max-height: 36px;
  7. min-height: 36px;
  8. }
  9. .form-control-sm {
  10. padding: 0.5rem 1.5rem;
  11. }
  12. select.form-control:not([multiple=multiple]) {
  13. background-image: none;
  14. }
  15. .input-group-sm > .form-control:not(textarea), .input-group-sm > .custom-select, .form-control-sm {
  16. max-height: 30px;
  17. min-height: 30px;
  18. line-height: 13px;
  19. }
  20. .input-group .form-control {
  21. height: 100%;
  22. }
  23. .input-group-text {
  24. padding: 0.7rem 0.9rem;
  25. }
  26. .help-block {
  27. display: block;
  28. margin-top: 7px;
  29. margin-bottom: 10px;
  30. color: #737373;
  31. }
  32. .control-label {
  33. padding-top: 7px;
  34. padding-right: 5px;
  35. margin-bottom: 0;
  36. font-size: 1rem;
  37. text-transform: capitalize;
  38. }
  39. .fields-group .row.form-group {
  40. margin-right: 0;
  41. margin-left: 0;
  42. }
  43. @media (min-width: 768px) {
  44. .form-group .control-label {
  45. text-align: right;
  46. }
  47. }
  48. .with-errors.help-block {
  49. margin-bottom: 4px;
  50. }
  51. .has-error .checkbox,
  52. .has-error .checkbox-inline,
  53. .has-error .control-label, .has-error .help-block,
  54. .has-error .radio,
  55. .has-error .radio-inline,
  56. .has-error.checkbox label,
  57. .has-error.radio label,
  58. .has-error .form-control-position i,
  59. .has-error .form-control:focus ~ .form-control-position i {
  60. color: $red-darker;
  61. }
  62. .control-label.asterisk:before {
  63. content: "*";
  64. font-weight: bold;
  65. color: $red-darker;
  66. }
  67. .form-group.has-error .form-control {
  68. border-color: $red-darker;
  69. }
  70. .input-group-prepend .input-group-text {
  71. margin-right: -1px;
  72. }
  73. // --------------------- input-group-addon ---------------------
  74. .input-group-addon {
  75. width: 1%;
  76. white-space: nowrap;
  77. vertical-align: middle;
  78. padding: 6px 12px;
  79. font-size: 14px;
  80. font-weight: 400;
  81. line-height: 1;
  82. text-align: center;
  83. background-color: $white;
  84. border: 1px solid $input-border-color;
  85. min-width: 30px;
  86. }
  87. .input-group-sm>.input-group-addon {
  88. height: 30px;
  89. padding: 5px 10px;
  90. font-size: .7rem;
  91. line-height: 1.5;
  92. }
  93. // --------------------- input-group-addon ---------------------
  94. // --------------------- select2 ---------------------
  95. .select2-container--default .select2-selection--single,
  96. .select2-container--default .select2-selection--multiple {
  97. border-color: $input-border-color!important;
  98. }
  99. .select2-container--classic .select2-selection--multiple .select2-selection__rendered li .select2-search__field, .select2-container--default .select2-selection--multiple .select2-selection__rendered li .select2-search__field {
  100. margin-top: 8px;
  101. }
  102. .input-group {
  103. .select2-container {
  104. width: 50%!important;
  105. flex: 1 1 auto;
  106. }
  107. }
  108. .select2-container--classic .select2-selection--single, .select2-container--default .select2-selection--single {
  109. min-height: 36px;
  110. padding: 5px;
  111. border: 1px solid rgba(0,0,0,.2);
  112. }
  113. .select2-container--default .select2-selection--single .select2-selection__arrow {
  114. height: 32px!important;
  115. }
  116. .select2-dropdown {
  117. border: 1px solid rgba(0, 0, 0, 0.03)!important;
  118. box-shadow: $shadow;
  119. }
  120. .select2-container--default .select2-results__option[aria-selected=true] {
  121. background-color: $gray-bg!important;
  122. }
  123. .select2-container--default .select2-results__option--highlighted[aria-selected] {
  124. background-color: $dark40!important;
  125. color: $font-color!important;
  126. }
  127. .select2-results__option {
  128. padding: 6px 10px!important;
  129. }
  130. .select2-container--default .select2-selection--multiple .select2-selection__choice {
  131. padding: 2px 5px!important;
  132. border: 0!important;
  133. font-size: 90%;
  134. background-color: $primary!important;
  135. }
  136. .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  137. color: #fff!important;
  138. }
  139. .select2-container--default .select2-selection--multiple .select2-selection__rendered {
  140. padding: 2px .7rem!important;
  141. }
  142. .select2-selection .default-text {
  143. display: inline-block;
  144. padding: .5rem .7rem 0;
  145. }
  146. .input-group-sm {
  147. .select2-container--classic .select2-selection--single, .select2-container--default .select2-selection--single {
  148. min-height: 31px;
  149. padding: 1px 2px;
  150. font-size: 0.7rem;
  151. }
  152. .select2-selection .default-text {
  153. padding: .3rem .5rem 0;
  154. }
  155. .select2-container--default .select2-selection--multiple .select2-selection__rendered {
  156. padding: 0 0.4rem !important;
  157. }
  158. .select2-container--default .select2-selection--multiple {
  159. min-height: 30px !important;
  160. padding: 0 2px;
  161. font-size: 0.7rem;
  162. line-height: 14px;
  163. }
  164. .select2-container--default .select2-selection--single .select2-selection__arrow {
  165. top: -3px;
  166. }
  167. .select2-container--classic .select2-selection--multiple .select2-selection__rendered li .select2-search__field, .select2-container--default .select2-selection--multiple .select2-selection__rendered li .select2-search__field {
  168. margin-top: 6px;
  169. }
  170. }
  171. // --------------------- select2 ---------------------
  172. // listbox图标
  173. .glyphicon-arrow-right:before {
  174. font-family: feather;
  175. content: "\e829";
  176. }
  177. .glyphicon-arrow-left:before {
  178. font-family: feather;
  179. content: "\e828";
  180. }
  181. .bootstrap-duallistbox-container .info {
  182. color: $font-color!important;
  183. }
  184. //
  185. .has-icon-left .form-control-position {
  186. right: auto;
  187. left: inherit;
  188. }
  189. .form-control-position {
  190. position: absolute;
  191. top: 2px;
  192. right: 0;
  193. z-index: 2;
  194. display: block;
  195. width: 2.5rem;
  196. height: 2.5rem;
  197. line-height: 2.5rem;
  198. text-align: center;
  199. }
  200. .has-icon-left .form-control {
  201. padding-right: 2rem;
  202. padding-left: 3rem;
  203. }