summaryrefslogtreecommitdiff
path: root/searx/static/themes/simple/src/less/autocomplete.less
blob: a1a74480b84c350e1e7b9f65886ab2c1a673e5be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*! Autocomplete.js v2.6.3 | license MIT | (c) 2017, Baptiste Donaux | http://autocomplete-js.com */

.autocomplete {
  position: absolute;
  max-height: 0;
  overflow-y: hidden;
  .ltr-text-align-left();

  .rounded-corners;

  &:active,
  &:focus,
  &:hover {
    background-color: var(--color-autocomplete-background);
  }

  &:empty {
    display: none;
  }

  > ul {
    list-style-type: none;
    margin: 0;
    padding: 0;

    > li {
      cursor: pointer;
      padding: 0.5rem;

      &.active,
      &:active,
      &:focus,
      &:hover {
        background-color: var(--color-autocomplete-background-hover);

        a:active,
        a:focus,
        a:hover {
          text-decoration: none;
        }
      }

      &.locked {
        cursor: inherit;
      }
    }
  }

  &.open {
    display: block;
    background-color: var(--color-autocomplete-background);
    color: var(--color-autocomplete-font);
    border: 1px solid var(--color-autocomplete-border);
    max-height: 500px;
    overflow-y: auto;
    z-index: 100;

    &:empty {
      display: none;
    }
  }
}

@media screen and (max-width: @phone) {
  .autocomplete {
    bottom: 0;
  }

  .autocomplete > ul > li {
    border-bottom: 1px solid var(--color-result-top-border);
    text-align: left;
  }
}