dropdown.css 757 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. .dropdown {
  2. position: relative;
  3. display: flex;
  4. }
  5. ul {
  6. margin: 0;
  7. padding: 0;
  8. }
  9. .dropdown__menu {
  10. list-style-type: none;
  11. display: flex;
  12. flex-direction: column;
  13. align-items: stretch;
  14. position: absolute;
  15. top: 100%;
  16. z-index: 3;
  17. white-space: nowrap;
  18. background-color: var(--dropdown-background);
  19. border: solid 1px #aaa;
  20. border-radius: 5px;
  21. }
  22. .dropdown__menu--hidden {
  23. display: none;
  24. }
  25. .dropdown__trigger {
  26. cursor: pointer;
  27. align-self: flex-start;
  28. padding: 0.5em;
  29. }
  30. .dropdown__trigger:hover {
  31. background-color: var(--dropdown-background-highlight);
  32. }
  33. .dropdown__item {
  34. padding: 0.7em;
  35. cursor: pointer;
  36. text-decoration: none;
  37. }
  38. .dropdown__item:hover {
  39. background-color: var(--dropdown-background-highlight);
  40. }