mention.scss 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. @use 'sass:map';
  2. @use 'mixins/mixins' as *;
  3. @use 'mixins/var' as *;
  4. @use 'common/var' as *;
  5. @include b(mention) {
  6. position: relative;
  7. width: 100%;
  8. @include e(popper) {
  9. @include picker-popper(
  10. map.get($mention, 'bg-color'),
  11. map.get($mention, 'border'),
  12. map.get($mention, 'shadow')
  13. );
  14. }
  15. }
  16. @include b(mention-dropdown) {
  17. @include set-component-css-var('mention', $mention);
  18. @include e(item) {
  19. font-size: getCssVar('mention-font-size');
  20. padding: 0 20px;
  21. position: relative;
  22. white-space: nowrap;
  23. overflow: hidden;
  24. text-overflow: ellipsis;
  25. color: getCssVar('mention-option-color');
  26. height: getCssVar('mention-option-height');
  27. line-height: getCssVar('mention-option-height');
  28. box-sizing: border-box;
  29. min-width: getCssVar('mention-option-min-width');
  30. cursor: pointer;
  31. @include when(hovering) {
  32. background-color: getCssVar('mention-option-hover-background');
  33. }
  34. @include when(selected) {
  35. color: getCssVar('mention-option-selected-color');
  36. font-weight: bold;
  37. }
  38. @include when(disabled) {
  39. color: getCssVar('mention-option-disabled-color');
  40. cursor: not-allowed;
  41. background-color: unset;
  42. }
  43. }
  44. }
  45. @include b(mention-dropdown) {
  46. z-index: calc(#{getCssVar('index-top')} + 1);
  47. border-radius: getCssVar('border-radius-base');
  48. box-sizing: border-box;
  49. }
  50. @include b(mention-dropdown__loading) {
  51. padding: 10px 0;
  52. margin: 0;
  53. text-align: center;
  54. color: getCssVar('mention-option-loading-color');
  55. font-size: 12px;
  56. min-width: getCssVar('mention-option-min-width');
  57. }
  58. @include b(mention-dropdown__wrap) {
  59. max-height: getCssVar('mention-max-height');
  60. }
  61. @include b(mention-dropdown__list) {
  62. list-style: none;
  63. padding: getCssVar('mention-padding');
  64. margin: 0;
  65. box-sizing: border-box;
  66. }
  67. @include b(mention-dropdown__header) {
  68. padding: getCssVar('mention-header-padding');
  69. border-bottom: getCssVar('mention-border');
  70. }
  71. @include b(mention-dropdown__footer) {
  72. padding: getCssVar('mention-footer-padding');
  73. border-top: getCssVar('mention-border');
  74. }