option.scss 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. $module: #{$prefix}-autoComplete;
  2. $filterable: #{$module}-filterable;
  3. .#{$module}-option {
  4. @include font-size-regular;
  5. word-break: break-all;
  6. padding-left: $spacing-autoComplete_option-paddingLeft;
  7. padding-right: $spacing-autoComplete_option-paddingRight;
  8. padding-top: $spacing-autoComplete_option-paddingTop;
  9. padding-bottom: $spacing-autoComplete_option-paddingBottom;
  10. color: $color-autoComplete_option_main-text;
  11. border-radius: $radius-autoComplete_option;
  12. position: relative;
  13. display: flex;
  14. flex-wrap: nowrap;
  15. align-items: center;
  16. cursor: pointer;
  17. box-sizing: border-box;
  18. transition: background-color $transition_duration-autoComplete_option-bg $transition_function-autoComplete_option-bg $transition_delay-autoComplete_option-bg;
  19. &-icon {
  20. width: $width-autoComplete_option_tick;
  21. color: $color-autoComplete_option-icon-default;
  22. visibility: hidden;
  23. margin-right: $spacing-autoComplete_option_tick-marginRight;
  24. display: flex;
  25. justify-content: center;
  26. align-content: center;
  27. }
  28. &-text {
  29. display: flex;
  30. flex-wrap: wrap;
  31. white-space: pre;
  32. }
  33. &-keyword {
  34. color: $color-autoComplete_option_keyword-text;
  35. background-color: inherit;
  36. font-weight: $font-autoComplete_keyword-fontWeight;
  37. }
  38. // &:hover {
  39. // background-color: $color-autoComplete_option-bg-hover;
  40. // }
  41. &:active {
  42. background-color: $color-autoComplete_option-bg-active;
  43. }
  44. &-empty {
  45. cursor: not-allowed;
  46. color: $color-autoComplete_option_disabled-text;
  47. justify-content: center;
  48. &:hover {
  49. background-color: inherit;
  50. }
  51. &:active {
  52. background-color: inherit;
  53. }
  54. }
  55. &-disabled {
  56. color: $color-autoComplete_option_disabled-text;
  57. cursor: not-allowed;
  58. &:hover {
  59. background-color: $color-autoComplete_option-bg-hover;
  60. }
  61. }
  62. &-selected {
  63. font-weight: $font-weight-bold;
  64. .#{$module}-option-icon {
  65. visibility: visible;
  66. color: $color-autoComplete_option-icon-active;
  67. }
  68. }
  69. &-focused {
  70. background-color: $color-autoComplete_option-bg-hover;
  71. }
  72. &:first-of-type {
  73. margin-top: $spacing-autoComplete_option_first-marginTop;
  74. }
  75. &:last-of-type {
  76. margin-bottom: $spacing-autoComplete_option_last-marginBottom;
  77. }
  78. }