_form_select_box.scss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. $select-input-height: 35px;
  2. $select-input-bg-disabled: $input-bg-disabled;
  3. @mixin select-control() {
  4. width: 100%;
  5. margin-right: $gf-form-margin;
  6. @include border-radius($input-border-radius-sm);
  7. background-color: $input-bg;
  8. }
  9. @mixin select-control-focus() {
  10. border-color: $input-border-focus;
  11. outline: none;
  12. $shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px $input-box-shadow-focus;
  13. @include box-shadow($shadow);
  14. }
  15. .gf-form-select2__control {
  16. @include select-control();
  17. border: 1px solid $input-border-color;
  18. color: $input-color;
  19. cursor: default;
  20. display: table;
  21. border-spacing: 0;
  22. border-collapse: separate;
  23. height: $select-input-height;
  24. outline: none;
  25. overflow: hidden;
  26. position: relative;
  27. }
  28. .gf-form-select2__control--is-focused {
  29. background-color: $input-bg;
  30. @include select-control-focus();
  31. }
  32. .gf-form-select2__control--is-disabled {
  33. background-color: $select-input-bg-disabled;
  34. }
  35. .gf-form-select2__control--menu-right {
  36. .gf-form-select2__menu {
  37. right: 0;
  38. left: unset;
  39. }
  40. }
  41. .gf-form-select2__input {
  42. position: absolute;
  43. z-index: 1;
  44. top: 0;
  45. left: 0;
  46. right: 0;
  47. padding: 8px 10px;
  48. }
  49. .gf-form-select2__menu {
  50. background: $select-input-bg-disabled;
  51. position: absolute;
  52. z-index: 2;
  53. width: 100%;
  54. }
  55. .tag-filter .gf-form-select2__menu {
  56. width: 100%;
  57. }
  58. .gf-form-select2__multi-value {
  59. display: inline;
  60. }
  61. .gf-form-select2__option {
  62. border-left: 2px solid transparent;
  63. &.gf-form-select2__option--is-focused,
  64. &.gf-form-select2__option--is-selected {
  65. background-color: $dropdownLinkBackgroundHover;
  66. color: $dropdownLinkColorHover;
  67. @include left-brand-border-gradient();
  68. .fa {
  69. color: $white;
  70. }
  71. }
  72. }
  73. .gf-form-select2__value-container {
  74. display: table-cell;
  75. padding: 8px 10px;
  76. }
  77. .gf-form-select2__indicators {
  78. display: table-cell;
  79. vertical-align: middle;
  80. padding-right: 5px;
  81. width: 25px;
  82. }
  83. .gf-form-select2__select-arrow {
  84. border-color: $input-color-select-arrow transparent transparent;
  85. border-style: solid;
  86. border-width: 5px 5px 2.5px;
  87. display: inline-block;
  88. height: 0;
  89. width: 0;
  90. position: relative;
  91. &.gf-form-select2__select-arrow--reversed {
  92. border-color: transparent transparent $input-color-select-arrow;
  93. top: -2px;
  94. border-width: 0 5px 5px;
  95. }
  96. }
  97. .gf-form-input--form-dropdown {
  98. padding: 0;
  99. border: 0;
  100. overflow: visible;
  101. }
  102. .gf-form--has-input-icon {
  103. .gf-form-select2__value-container {
  104. padding-left: 30px;
  105. }
  106. }