option.scss 2.3 KB

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