dropdown.scss 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. //@import '../theme/variables.scss';
  2. @import './variables.scss';
  3. $module: #{$prefix}-dropdown;
  4. .#{$module} {
  5. @include font-size-regular;
  6. &-wrapper {
  7. @include shadow-elevated;
  8. position: relative;
  9. z-index: $z-dropdown;
  10. border-radius: $radius-dropdown;
  11. background: $color-dropdown-bg-default;
  12. visibility: hidden;
  13. // min-width: 150px;
  14. &-show {
  15. visibility: visible;
  16. }
  17. }
  18. &-trigger {
  19. display: inline-block;
  20. }
  21. &-menu {
  22. list-style: none;
  23. padding: $spacing-dropdown_menu-paddingY $spacing-dropdown_menu-paddingX;
  24. margin: 0;
  25. }
  26. &-title {
  27. color: $color-dropdown_title-text-default;
  28. padding-top: $spacing-dropdown_title-paddingTop;
  29. padding-bottom: $spacing-dropdown_title-paddingBottom;
  30. padding-left: $spacing-dropdown_title-paddingLeft;
  31. padding-right: $spacing-dropdown_title-paddingRight;
  32. &-withTick {
  33. padding-left: $spacing-dropdown_title_withTick-paddingLeft;
  34. }
  35. @include font-size-small;
  36. cursor: default;
  37. }
  38. &-item {
  39. padding: $spacing-dropdown_item-paddingY $spacing-dropdown_item-paddingX;
  40. color: $color-dropdown_item-text-default;
  41. max-width: $width-dropdown;
  42. display: flex;
  43. align-items: center;
  44. &:not(.#{$module}-item-active):hover {
  45. background-color: $color-dropdown_item-bg-hover;
  46. cursor: pointer;
  47. }
  48. &:not(.#{$module}-item-active):active {
  49. background-color: $color-dropdown_item-bg-active;
  50. }
  51. &:focus-visible {
  52. background-color: $color-dropdown_item-bg-hover;
  53. outline: 0;
  54. }
  55. &-icon {
  56. display: inline-flex;
  57. align-items: center;
  58. // margin-left: $spacing-tight;
  59. margin-right: $spacing-tight;
  60. }
  61. &-danger {
  62. color: $color-dropdown_item_danger-text-default;
  63. }
  64. &-secondary {
  65. color: $color-dropdown_item_secondary-text-default;
  66. }
  67. &-warning {
  68. color: $color-dropdown_item_warning-text-default;
  69. }
  70. &-tertiary {
  71. color: $color-dropdown_item_tertiary-text-default;
  72. }
  73. &-primary {
  74. color: $color-dropdown_item_primary-text-default;
  75. }
  76. &-withTick {
  77. padding-left: $spacing-dropdown_item_withTick-paddingLeft;
  78. }
  79. & > .#{$prefix}-icon {
  80. flex-shrink: 0;
  81. margin-right: $spacing-dropdown_icon-marginRight;
  82. font-size: $size-dropdown-icon-width;
  83. }
  84. &-active {
  85. font-weight: $font-dropdown_item_active-fontWeight;
  86. }
  87. }
  88. &-item.#{$module}-item-disabled {
  89. color: $color-dropdown_item_disabled-text-default;
  90. cursor: not-allowed;
  91. &:hover,
  92. &:active {
  93. cursor: not-allowed;
  94. background-color: $color-dropdown_item_disabled-bg-default;
  95. }
  96. }
  97. &-divider {
  98. display: block;
  99. height: $height-dropdown_seperator;
  100. width: 100%;
  101. min-width: 100%;
  102. clear: both;
  103. background: $color-dropdown_seperator-bg-default;
  104. margin: $spacing-dropdown_seperator-marginY $spacing-dropdown_seperator-marginX;
  105. }
  106. }
  107. @import './rtl.scss';