dropdown.scss 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. &-icon {
  52. display: inline-flex;
  53. align-items: center;
  54. // margin-left: $spacing-tight;
  55. margin-right: $spacing-tight;
  56. }
  57. &-danger {
  58. color: $color-dropdown_item_danger-text-default;
  59. }
  60. &-secondary {
  61. color: $color-dropdown_item_secondary-text-default;
  62. }
  63. &-warning {
  64. color: $color-dropdown_item_warning-text-default;
  65. }
  66. &-tertiary {
  67. color: $color-dropdown_item_tertiary-text-default;
  68. }
  69. &-primary {
  70. color: $color-dropdown_item_primary-text-default;
  71. }
  72. &-withTick {
  73. padding-left: $spacing-dropdown_item_withTick-paddingLeft;
  74. }
  75. & > .#{$prefix}-icon {
  76. flex-shrink: 0;
  77. margin-right: $spacing-dropdown_icon-marginRight;
  78. font-size: $size-dropdown-icon-width;
  79. }
  80. &-active {
  81. font-weight: $font-dropdown_item_active-fontWeight;
  82. }
  83. }
  84. &-item.#{$module}-item-disabled {
  85. color: $color-dropdown_item_disabled-text-default;
  86. cursor: not-allowed;
  87. &:hover,
  88. &:active {
  89. cursor: not-allowed;
  90. background-color: $color-dropdown_item_disabled-bg-default;
  91. }
  92. }
  93. &-divider {
  94. display: block;
  95. height: $height-dropdown_seperator;
  96. width: 100%;
  97. min-width: 100%;
  98. clear: both;
  99. background: $color-dropdown_seperator-bg-default;
  100. margin: $spacing-dropdown_seperator-marginY $spacing-dropdown_seperator-marginX;
  101. }
  102. }
  103. @import './rtl.scss';