autocomplete.less 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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-width: calc(100% - 2 * @search-padding-horizontal);
  6. max-height: 0;
  7. overflow-y: hidden;
  8. .ltr-text-align-left();
  9. .rounded-corners;
  10. &:active,
  11. &:focus,
  12. &:hover {
  13. background-color: var(--color-autocomplete-background);
  14. }
  15. &:empty {
  16. display: none;
  17. }
  18. > ul {
  19. list-style-type: none;
  20. margin: 0;
  21. padding: 0;
  22. > li {
  23. cursor: pointer;
  24. padding: 0.5rem 1rem;
  25. &.active,
  26. &:active,
  27. &:focus,
  28. &:hover {
  29. background-color: var(--color-autocomplete-background-hover);
  30. a:active,
  31. a:focus,
  32. a:hover {
  33. text-decoration: none;
  34. }
  35. }
  36. &.locked {
  37. cursor: inherit;
  38. }
  39. }
  40. }
  41. &.open {
  42. display: block;
  43. background-color: var(--color-autocomplete-background);
  44. color: var(--color-autocomplete-font);
  45. max-height: 32rem;
  46. overflow-y: auto;
  47. z-index: 5000;
  48. margin-top: 3.5rem;
  49. border-radius: 0.8rem;
  50. &:empty {
  51. display: none;
  52. }
  53. }
  54. }
  55. @media screen and (max-width: @phone) {
  56. .autocomplete {
  57. > ul > li {
  58. padding: 1rem;
  59. }
  60. }
  61. }