_ButtonMenu.scss 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. @mixin buttonMenu() {
  2. .esri-button-menu {
  3. width: $button-width;
  4. height: $button-height;
  5. .esri-button-menu__button {
  6. align-items: center;
  7. background-color: transparent;
  8. border: none;
  9. color: $interactive-font-color;
  10. display: flex;
  11. font-size: $icon-size;
  12. height: $button-height;
  13. justify-content: center;
  14. text-align: center;
  15. transition: background-color 125ms ease-in-out;
  16. width: $button-width;
  17. &:disabled {
  18. cursor: default;
  19. color: $interactive-font-color--disabled;
  20. }
  21. &:hover,
  22. &:focus {
  23. background-color: $background-color--hover;
  24. color: $interactive-font-color--hover;
  25. cursor: pointer;
  26. }
  27. &.esri-button-menu__button--selected,
  28. &.esri-button-menu__button--selected:hover {
  29. background: $background-color--inverse;
  30. color: $interactive-font-color--inverse;
  31. }
  32. }
  33. .esri-button-menu__content-wrapper {
  34. position: relative;
  35. display: inline-block;
  36. }
  37. }
  38. .esri-button-menu__content {
  39. border-radius: $border-radius;
  40. box-shadow: 0 2px 6px rgba(0, 0, 0, 0.33);
  41. background-color: $background-color;
  42. max-height: 250px;
  43. min-width: 200px;
  44. overflow: auto;
  45. z-index: 1;
  46. .esri-button-menu__item-wrapper,
  47. .esri-button-menu__embedded-content-wrapper {
  48. list-style: none;
  49. margin: 0;
  50. padding: 0;
  51. }
  52. }
  53. .esri-button-menu__item {
  54. display: block;
  55. padding: 0;
  56. .esri-button-menu__item-label {
  57. align-items: center;
  58. color: $font-color;
  59. cursor: pointer;
  60. display: flex;
  61. font-family: $font-family;
  62. font-weight: $font-weight;
  63. font-size: $font-size;
  64. justify-content: flex-start;
  65. margin: 0;
  66. padding: $cap-spacing $side-spacing;
  67. position: relative;
  68. text-decoration: none;
  69. .esri-button-menu__item-label-content {
  70. padding: 0 $side-spacing--half;
  71. width: auto;
  72. }
  73. &:hover {
  74. background-color: $background-color--hover;
  75. color: $interactive-font-color--hover;
  76. }
  77. }
  78. .esri-button-menu__icon {
  79. color: $button-color;
  80. }
  81. .esri-button-menu__checkbox {
  82. position: absolute;
  83. opacity: 0;
  84. &:checked {
  85. & ~ .esri-button-menu__embedded-content-wrapper {
  86. display: block;
  87. }
  88. }
  89. }
  90. .esri-button-menu__embedded-content-wrapper {
  91. display: none;
  92. .esri-button-menu__checkbox {
  93. &:checked {
  94. & ~ .esri-button-menu__item-label {
  95. .esri-button-menu__icon {
  96. display: block;
  97. }
  98. }
  99. }
  100. }
  101. }
  102. }
  103. .esri-button-menu__item--selectable {
  104. .esri-button-menu__icon {
  105. display: none;
  106. }
  107. }
  108. }
  109. @if $include_ButtonMenu == true {
  110. @include buttonMenu();
  111. }