aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/header/search-typeahead.component.scss
blob: 93f021e332dd09c1184e0c02f2c745d868230d8b (plain) (blame)
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
@import '_mixins';

.jump-to-suggestions {
  top: 100%;
  left: 0;
  z-index: 35;
  width: 100%;
}

#typeahead-instructions,
#jump-to-results {
  border: 1px solid var(--mainBackgroundColor);
  border-bottom-right-radius: 3px;
  border-bottom-left-radius: 3px;
  background: var(--mainBackgroundColor);
  transition: .3s ease;
  transition-property: box-shadow;
}

#typeahead-instructions {
  margin-top: 10px;
  width: 100%;
  padding: .5rem 1rem;

  ul {
    list-style: none;
    padding: 0;
    margin-bottom: .5rem;

    em {
      font-weight: 600;
      margin-right: 0.2rem;
      font-style: normal;
    }
  }
}

#typeahead-container {
  ::ng-deep input {
    border: 1px solid var(--mainBackgroundColor) !important;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 20px 0px;
    flex-grow: 1;
    transition: box-shadow .3s ease, width .2s ease;
  }

  ::ng-deep span {
    right: 10px;
  }

  & > div:last-child {
    // we have to switch the display and not the opacity, 
    // to avoid clashing with the rest of the interface.
    display: none;
  }

  &:focus,
  ::ng-deep &:focus-within {
    & > div:last-child {
      display: initial !important;
      
      #typeahead-instructions,
      #jump-to-results {
        box-shadow: rgba(0, 0, 0, 0.2) 0px 10px 20px -5px;
      }
    }

    ::ng-deep input {
      box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 20px 0px;
      border-end-start-radius: 0;
      border-end-end-radius: 0;

      @media screen and (min-width: 900px) {
        width: 500px;
      }
    }
  }
}

a.focus-visible {
  background-color: var(--mainHoverColor);
}

a {
  @include disable-default-a-behaviour;
  width: 100%;

  &, &:hover {
    color: var(--mainForegroundColor);
  }
}

.bg-gray {
  background-color: var(--mainBackgroundColor);
}

.text-gray-light {
  color: var(--mainForegroundColor);
}

.glyphicon {
  top: 3px;
}

.advanced-search-status {
  cursor: help;
}

.small-title {
  @include in-content-small-title;

  margin-bottom: .5rem;
}

my-global-icon {
  width: 17px;
  position: relative;
  top: -2px;
  margin: 5px;

  @include apply-svg-color(var(--mainForegroundColor))
}