_form_select_box.scss 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. $select-input-height: 35px;
  2. $select-menu-max-height: 300px;
  3. $select-item-font-size: $font-size-base;
  4. $select-item-bg: $dropdownBackground;
  5. $select-item-fg: $input-color;
  6. $select-option-bg: $dropdownBackground;
  7. $select-option-color: $input-color;
  8. $select-noresults-color: $text-color;
  9. $select-input-bg: $input-bg;
  10. $select-input-border-color: $input-border-color;
  11. $select-menu-box-shadow: $menu-dropdown-shadow;
  12. @import '../../../node_modules/react-select/scss/default.scss';
  13. @mixin select-control() {
  14. width: 100%;
  15. margin-right: $gf-form-margin;
  16. @include border-radius($input-border-radius-sm);
  17. background-color: $input-bg;
  18. }
  19. @mixin select-control-focus() {
  20. border-color: $input-border-focus;
  21. outline: none;
  22. $shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px $input-box-shadow-focus;
  23. @include box-shadow($shadow);
  24. }
  25. .gf-form-input--form-dropdown {
  26. padding: 0;
  27. border: 0;
  28. overflow: visible;
  29. .Select-placeholder {
  30. color: $gray-4;
  31. }
  32. > .Select-control {
  33. @include select-control();
  34. border-color: $dark-3;
  35. }
  36. &.is-open > .Select-control {
  37. background: transparent;
  38. border-color: $dark-3;
  39. }
  40. &.is-focused > .Select-control {
  41. background-color: $input-bg;
  42. @include select-control-focus();
  43. }
  44. .Select-menu-outer {
  45. border: 0;
  46. width: auto;
  47. }
  48. .Select-option.is-focused {
  49. background-color: $dropdownLinkBackgroundHover;
  50. color: $dropdownLinkColorHover;
  51. &::before {
  52. position: absolute;
  53. left: 0;
  54. top: 0;
  55. height: 100%;
  56. width: 2px;
  57. display: block;
  58. content: '';
  59. background-image: linear-gradient(to bottom, #ffd500 0%, #ff4400 99%, #ff4400 100%);
  60. }
  61. }
  62. }