_select2.scss 2.6 KB

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