option.scss 2.3 KB

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