_form.scss 3.8 KB

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