autocomplete.less 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. @background_color: white;
  2. .autocomplete {
  3. position: absolute;
  4. max-height: 0;
  5. overflow-y: hidden;
  6. text-align: left;
  7. &:active, &:focus, &:hover {
  8. background-color: @background_color;
  9. }
  10. &:empty {
  11. display: none;
  12. }
  13. > ul {
  14. list-style-type: none;
  15. margin: 0;
  16. padding: 0;
  17. > li {
  18. cursor: pointer;
  19. padding: 5px 0 5px 10px;
  20. &.active, &:active, &:focus {
  21. background-color: @color-base;
  22. a:active, a:focus, a:hover {
  23. text-decoration: none;
  24. }
  25. }
  26. &.locked {
  27. cursor: inherit;
  28. }
  29. }
  30. }
  31. &.open {
  32. display: block;
  33. background-color: @background_color;
  34. border: 1px solid @color-base;
  35. max-height: 500px;
  36. overflow-y: auto;
  37. z-index:100;
  38. &:empty {
  39. display: none;
  40. }
  41. }
  42. }
  43. @media screen and (max-width: @results-width) {
  44. .autocomplete {
  45. bottom: 0;
  46. }
  47. .autocomplete > ul > li {
  48. padding: 7px 0 7px 10px;
  49. border-bottom: 1px solid @color-result-top-border;
  50. text-align: left;
  51. }
  52. }