_form_select_box.scss 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. }
  54. .gf-form-select2__option {
  55. border-left: 2px solid transparent;
  56. &.gf-form-select2__option--is-focused,
  57. &.gf-form-select2__option--is-selected {
  58. background-color: $dropdownLinkBackgroundHover;
  59. color: $dropdownLinkColorHover;
  60. @include left-brand-border-gradient();
  61. .fa {
  62. color: $white;
  63. }
  64. }
  65. }
  66. .gf-form-select2__value-container {
  67. display: table-cell;
  68. padding: 8px 10px;
  69. }
  70. .gf-form-select2__indicators {
  71. display: table-cell;
  72. vertical-align: middle;
  73. padding-right: 5px;
  74. width: 25px;
  75. }
  76. .gf-form-select2__select-arrow {
  77. border-color: $input-color-select-arrow transparent transparent;
  78. border-style: solid;
  79. border-width: 5px 5px 2.5px;
  80. display: inline-block;
  81. height: 0;
  82. width: 0;
  83. position: relative;
  84. &.gf-form-select2__select-arrow--reversed {
  85. border-color: transparent transparent $input-color-select-arrow;
  86. top: -2px;
  87. border-width: 0 5px 5px;
  88. }
  89. }
  90. .gf-form-input--form-dropdown {
  91. padding: 0;
  92. border: 0;
  93. overflow: visible;
  94. }