autocomplete.less 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*! Autocomplete.js v2.6.3 | license MIT | (c) 2017, Baptiste Donaux | http://autocomplete-js.com */
  2. .autocomplete {
  3. position: absolute;
  4. width: @search-width;
  5. max-height: 0;
  6. overflow-y: hidden;
  7. .ltr-text-align-left();
  8. .rounded-corners;
  9. &:active,
  10. &:focus,
  11. &:hover {
  12. background-color: var(--color-autocomplete-background);
  13. }
  14. &:empty {
  15. display: none;
  16. }
  17. > ul {
  18. list-style-type: none;
  19. margin: 0;
  20. padding: 0;
  21. > li {
  22. cursor: pointer;
  23. padding: 0.5rem 1rem;
  24. &.active,
  25. &:active,
  26. &:focus,
  27. &:hover {
  28. background-color: var(--color-autocomplete-background-hover);
  29. a:active,
  30. a:focus,
  31. a:hover {
  32. text-decoration: none;
  33. }
  34. }
  35. &.locked {
  36. cursor: inherit;
  37. }
  38. }
  39. }
  40. &.open {
  41. display: block;
  42. background-color: var(--color-autocomplete-background);
  43. color: var(--color-autocomplete-font);
  44. max-height: 32rem;
  45. overflow-y: auto;
  46. z-index: 100;
  47. margin-top: 3.5rem;
  48. border-radius: 0.8rem;
  49. box-shadow: 0 2px 8px rgb(34 38 46 / 25%);
  50. &:empty {
  51. display: none;
  52. }
  53. }
  54. }
  55. @media screen and (max-width: @phone) {
  56. .autocomplete {
  57. width: 100%;
  58. > ul > li {
  59. padding: 1rem;
  60. }
  61. }
  62. }