option.scss 913 B

123456789101112131415161718192021222324252627282930313233343536
  1. @use 'sass:map';
  2. @use 'mixins/mixins' as *;
  3. @use 'common/var' as *;
  4. @include b(select-dropdown) {
  5. @include e(item) {
  6. font-size: map.get($select, 'font-size');
  7. // 20 as the padding of option item, 12 as the size of ✓ icon size
  8. padding: 0 #{20 + 12}px 0 20px;
  9. position: relative;
  10. white-space: nowrap;
  11. overflow: hidden;
  12. text-overflow: ellipsis;
  13. color: map.get($select-option, 'text-color');
  14. height: map.get($select-option, 'height');
  15. line-height: map.get($select-option, 'height');
  16. box-sizing: border-box;
  17. cursor: pointer;
  18. @include when(disabled) {
  19. color: map.get($select-option, 'disabled-color');
  20. cursor: not-allowed;
  21. }
  22. &.hover,
  23. &:hover {
  24. background-color: map.get($select-option, 'hover-background');
  25. }
  26. &.selected {
  27. color: map.get($select-option, 'selected-text-color');
  28. font-weight: bold;
  29. }
  30. }
  31. }