_form.scss 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. .form-control-sm {
  2. padding: 0.5rem 1.5rem;
  3. }
  4. select.form-control:not([multiple=multiple]) {
  5. background-image: none;
  6. }
  7. .input-group-sm > .form-control:not(textarea), .input-group-sm > .custom-select, .form-control-sm {
  8. height: 30px;
  9. line-height: 13px;
  10. }
  11. .input-group-text {
  12. padding: 0.7rem 0.9rem;
  13. }
  14. .help-block {
  15. display: block;
  16. margin-top: 7px;
  17. margin-bottom: 10px;
  18. color: #737373;
  19. }
  20. .control-label {
  21. padding-top: 7px;
  22. padding-right: 5px;
  23. margin-bottom: 0;
  24. font-size: 1rem;
  25. text-transform: capitalize;
  26. }
  27. .fields-group .row.form-group {
  28. margin-right: 0;
  29. margin-left: 0;
  30. }
  31. @media (min-width: 768px) {
  32. .form-group .control-label {
  33. text-align: right;
  34. }
  35. }
  36. .with-errors.help-block {
  37. margin-bottom: 4px;
  38. }
  39. .has-error .checkbox,
  40. .has-error .checkbox-inline,
  41. .has-error .control-label, .has-error .help-block,
  42. .has-error .radio,
  43. .has-error .radio-inline,
  44. .has-error.checkbox label,
  45. .has-error.radio label,
  46. .has-error .form-control-position i,
  47. .has-error .form-control:focus ~ .form-control-position i {
  48. color: $red-darker;
  49. }
  50. .control-label.asterisk:before {
  51. content: "*";
  52. font-weight: bold;
  53. color: $red-darker;
  54. }
  55. .form-group.has-error .form-control {
  56. border-color: $red-darker;
  57. }
  58. .input-group-prepend .input-group-text {
  59. margin-right: -1px;
  60. }
  61. // --------------------- input-group-addon ---------------------
  62. .input-group-addon {
  63. width: 1%;
  64. white-space: nowrap;
  65. vertical-align: middle;
  66. padding: 6px 12px;
  67. font-size: 14px;
  68. font-weight: 400;
  69. line-height: 1;
  70. text-align: center;
  71. background-color: $white;
  72. border: 1px solid $input-border-color;
  73. min-width: 30px;
  74. }
  75. .input-group-sm>.input-group-addon {
  76. height: 30px;
  77. padding: 5px 10px;
  78. font-size: .7rem;
  79. line-height: 1.5;
  80. }
  81. // --------------------- input-group-addon ---------------------
  82. // --------------------- select2 ---------------------
  83. .input-group-sm {
  84. .select2-container--classic .select2-selection--single, .select2-container--default .select2-selection--single {
  85. min-height: 31px;
  86. padding: 1px 2px;
  87. font-size: 0.7rem;
  88. }
  89. .select2-container--default .select2-selection--multiple {
  90. min-height: 30px !important;
  91. padding: 0 2px;
  92. font-size: 0.7rem;
  93. line-height: 14px;
  94. }
  95. .select2-container--default .select2-selection--single .select2-selection__arrow {
  96. top: -3px;
  97. }
  98. .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 {
  99. margin-top: 6px;
  100. }
  101. }
  102. .select2-container--default .select2-selection--single,
  103. .select2-container--default .select2-selection--multiple {
  104. border-color: $input-border-color!important;
  105. }
  106. .input-group {
  107. .select2-container {
  108. width: 50%!important;
  109. flex: 1 1 auto;
  110. }
  111. }
  112. .select2-dropdown {
  113. border: 1px solid rgba(0, 0, 0, 0.03)!important;
  114. box-shadow: $shadow;
  115. }
  116. .select2-container--default .select2-results__option[aria-selected=true] {
  117. background-color: $gray-bg!important;
  118. }
  119. .select2-container--default .select2-results__option--highlighted[aria-selected] {
  120. background-color: $dark40!important;
  121. color: $font-color!important;
  122. }
  123. .select2-results__option {
  124. padding: 6px 10px!important;
  125. }
  126. .select2-container--default .select2-selection--multiple .select2-selection__choice {
  127. padding: 2px 5px!important;
  128. border: 0!important;
  129. }
  130. // --------------------- select2 ---------------------
  131. .select2-selection .default-text {
  132. display: inline-block;
  133. padding: 6px;
  134. }
  135. // listbox图标
  136. .glyphicon-arrow-right:before {
  137. font-family: feather;
  138. content: "\e829";
  139. }
  140. .glyphicon-arrow-left:before {
  141. font-family: feather;
  142. content: "\e828";
  143. }
  144. .bootstrap-duallistbox-container .info {
  145. color: $font-color!important;
  146. }