_dropdown.scss 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. .w-dropdown__toggle {
  2. @apply w-px-2 w-text-text-label w-bg-transparent w-border-2 w-border-transparent;
  3. }
  4. .w-dropdown__toggle--icon {
  5. @apply w-w-8 w-h-8 more-contrast:w-p-0 more-contrast:w-border more-contrast:w-rounded-sm more-contrast:w-border-border-interactive-more-contrast hover:more-contrast:w-border-border-interactive-more-contrast-hover;
  6. }
  7. .w-dropdown__toggle-icon {
  8. @apply w-w-4 w-h-4 w-align-text-bottom w-transition motion-reduce:w-transition-none;
  9. }
  10. .w-dropdown__content {
  11. @apply w-flex w-flex-col w-justify-start w-py-2;
  12. max-height: 50vh;
  13. overflow-y: auto;
  14. }
  15. .w-dropdown__content :where(a, button) {
  16. @apply w-bg-transparent w-inline-flex w-items-center w-text-left w-font-bold w-text-text-label-menus-default w-py-3 w-px-6 w-no-underline w-transition w-outline-offset-inside w-w-full;
  17. .icon {
  18. @apply w-w-4 w-h-4 w-mr-3 w-transition w-shrink-0;
  19. }
  20. .icon-wrapper .icon {
  21. @apply w-mr-0;
  22. }
  23. &:hover {
  24. @apply w-text-text-label-menus-active w-bg-surface-menu-item-active;
  25. }
  26. }
  27. /* Only apply the hover-opacity effect for the default "dropdown" theme */
  28. .w-dropdown--dropdown .w-dropdown__content :where(a, button) {
  29. .icon {
  30. @apply w-opacity-50;
  31. }
  32. &:hover {
  33. .icon {
  34. @apply w-opacity-100;
  35. }
  36. }
  37. }
  38. .w-dropdown--popup {
  39. .w-dropdown__content {
  40. @apply w-p-4;
  41. }
  42. .w-dropdown__toggle {
  43. @apply w-p-0;
  44. }
  45. }