option.scss 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. transition: background-color $transition_duration-select_option-bg $transition_function-select_option-bg $transition_delay-select_option-bg;
  22. &-icon {
  23. width: $width-select_option_tick;
  24. color: $color-select_option-icon-default;
  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. color: $color-select_option-icon-active;
  68. }
  69. }
  70. &-focused {
  71. background-color: $color-select_option-bg-hover;
  72. }
  73. &:first-of-type {
  74. margin-top: $spacing-select_option_first-marginTop;
  75. }
  76. &:last-of-type {
  77. margin-bottom: $spacing-select_option_last-marginBottom;
  78. }
  79. }