summaryrefslogtreecommitdiffstats
path: root/asset/css/search-base.less
blob: 3fe99d8a892503082b57073ee3408ba0fcf83cf0 (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
// Style
.search-suggestions {
  background: var(--suggestions-bg, @suggestions-bg);
  border: 1px solid var(--suggestions-border-color, @suggestions-border-color);
  border-bottom-right-radius: .5em;
  border-bottom-left-radius:  .5em;

  > ul {
    list-style-type: none;

    > li {
      border-top: 1px solid var(--suggestions-separation-bg, @suggestions-separation-bg);
    }
    > li.suggestion-title + li {
      border: none;
    }
    > li:not(.default) + li.suggestion-title {
      border: none;
    }
  }

  .default {
    color: var(--suggestions-default-opt-color, @suggestions-default-opt-color);
    font-style: italic;

    [type="button"] {
      background-color: var(--suggestions-default-opt-bg, @suggestions-default-opt-bg);
    }
  }

  .suggestion-title {
    color: var(--suggestions-color, @suggestions-color);
    font-size: 80%;
  }

  .failure-message {
    font-weight: bold;

    em {
      font-weight: normal;
      color: var(--suggestions-failure-message-color, @suggestions-failure-message-color);
    }
  }

  .nothing-to-suggest {
    color: var(--suggestions-color, @suggestions-color);
  }

  .relation-path {
    padding: 0 .2em;
    background-color: var(--suggestions-relation-path-bg, @suggestions-relation-path-bg);
  }

  [type="button"] {
    .appearance(none);
    border: none;
    background: none;
  }

  [type="button"]:focus {
    background: var(--suggestions-focus-bg, @suggestions-focus-bg);
    color: var(--suggestions-focus-color, @suggestions-focus-color);
    outline: none;

    .relation-path {
      background-color: var(--suggestions-relation-path-focus-bg, @suggestions-relation-path-focus-bg);
    }
  }

  [type="button"]:not(:focus):hover {
    background: var(--suggestions-hover-bg, @suggestions-hover-bg);
  }
}

// Layout
.search-suggestions {
  z-index: 2; // Required so that nothing else can overlap it (such as opaque elements and the impact overlay)
  position: absolute;
  overflow: auto;
  min-width: 5em;

  &:empty {
    display: none;
  }

  > ul {
    margin: 0;
    padding: 0;

    li.suggestion-title {
      padding: 1.25em .625em 0 .625em;
    }

    li.failure-message {
      padding: .5em 1em;

      em {
        margin-right: .5em;
      }
    }

    li.nothing-to-suggest {
      padding: .5em 1em;
    }
  }

  [type="button"] {
    padding: .5em 1em;
    display: block;
    width: 100%;
    text-align: left;

    &[data-class="operator"], &[data-class="logical_operator"] {
      text-align: center;
    }

    &.has-details {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
    }

    .relation-path {
      margin-left: .5em;

      &::first-line {
        font-size: .8em;
      }
    }
  }
}