select2.less 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. .select2-container .select2-selection--single .select2-selection__rendered {
  36. padding-left: 0;
  37. padding-right: 0;
  38. height: auto;
  39. margin-top: -4px;
  40. }
  41. .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
  42. padding-right: 6px;
  43. padding-left: 20px;
  44. }
  45. .select2-container--default .select2-selection--single .select2-selection__arrow {
  46. height: 28px;
  47. right: 3px;
  48. }
  49. .select2-container--default .select2-selection--single .select2-selection__arrow b {
  50. margin-top: 0;
  51. }
  52. .select2-dropdown,
  53. .select2-search--inline {
  54. .select2-search__field {
  55. border: 1px solid @gray;
  56. &:focus {
  57. outline: none;
  58. border: 1px solid @light-blue;
  59. }
  60. }
  61. }
  62. .select2-container--default .select2-results__option[aria-disabled=true] {
  63. color: #999;
  64. }
  65. .select2-container--default .select2-results__option[aria-selected=true] {
  66. background-color: #ddd;
  67. &,
  68. &:hover {
  69. color: #444;
  70. }
  71. }
  72. //Multiple select
  73. .select2-container--default {
  74. .select2-selection--multiple {
  75. border: 1px solid @gray;
  76. border-radius: @input-radius;
  77. &:focus {
  78. border-color: @light-blue;
  79. }
  80. }
  81. &.select2-container--focus .select2-selection--multiple {
  82. border-color: @gray;
  83. }
  84. }
  85. .select2-container--default .select2-selection--multiple .select2-selection__choice {
  86. background-color: @light-blue;
  87. border-color: darken(@light-blue, 5%);
  88. padding: 1px 10px;
  89. color: #fff;
  90. }
  91. .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  92. margin-right: 5px;
  93. color: rgba(255,255,255,.7);
  94. &:hover {
  95. color: #fff;
  96. }
  97. }
  98. .select2-container .select2-selection--single .select2-selection__rendered {
  99. padding-right: 10px;
  100. }