select2.less 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * Plugin: Select2
  3. * ---------------
  4. */
  5. //Signle select
  6. .select2-container--default,
  7. .select2-selection {
  8. &.select2-container--focus,
  9. &:focus,
  10. &:active {
  11. outline: none;
  12. }
  13. .select2-selection--single {
  14. border: 1px solid @gray;
  15. border-radius: @input-radius;
  16. padding: 6px 12px;
  17. height: 34px;
  18. }
  19. }
  20. .select2-container--default.select2-container--open {
  21. border-color: @light-blue;
  22. }
  23. .select2-dropdown {
  24. border: 1px solid @gray;
  25. border-radius: @input-radius;
  26. }
  27. .select2-container--default .select2-results__option--highlighted[aria-selected] {
  28. background-color: @light-blue;
  29. color: white;
  30. }
  31. .select2-results__option {
  32. padding: 6px 12px;
  33. user-select: none;
  34. -webkit-user-select: none;
  35. }
  36. .select2-container .select2-selection--single .select2-selection__rendered {
  37. padding-left: 0;
  38. padding-right: 0;
  39. height: auto;
  40. margin-top: -4px;
  41. }
  42. .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
  43. padding-right: 6px;
  44. padding-left: 20px;
  45. }
  46. .select2-container--default .select2-selection--single .select2-selection__arrow {
  47. height: 28px;
  48. right: 3px;
  49. }
  50. .select2-container--default .select2-selection--single .select2-selection__arrow b {
  51. margin-top: 0;
  52. }
  53. .select2-dropdown,
  54. .select2-search--inline {
  55. .select2-search__field {
  56. border: 1px solid @gray;
  57. &:focus {
  58. outline: none;
  59. border: 1px solid @light-blue;
  60. }
  61. }
  62. }
  63. .select2-container--default .select2-results__option[aria-disabled=true] {
  64. color: #999;
  65. }
  66. .select2-container--default .select2-results__option[aria-selected=true] {
  67. background-color: #ddd;
  68. &,
  69. &:hover {
  70. color: #444;
  71. }
  72. }
  73. //Multiple select
  74. .select2-container--default {
  75. .select2-selection--multiple {
  76. border: 1px solid @gray;
  77. border-radius: @input-radius;
  78. &:focus {
  79. border-color: @light-blue;
  80. }
  81. }
  82. &.select2-container--focus .select2-selection--multiple {
  83. border-color: @gray;
  84. }
  85. }
  86. .select2-container--default .select2-selection--multiple .select2-selection__choice {
  87. background-color: @light-blue;
  88. border-color: darken(@light-blue, 5%);
  89. padding: 1px 10px;
  90. color: #fff;
  91. }
  92. .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  93. margin-right: 5px;
  94. color: rgba(255, 255, 255, .7);
  95. &:hover {
  96. color: #fff;
  97. }
  98. }
  99. .select2-container .select2-selection--single .select2-selection__rendered {
  100. padding-right: 10px;
  101. }