_form.scss 4.0 KB

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