]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/header/search-typeahead.component.scss
Migrate to bootstrap 5
[github/Chocobozzz/PeerTube.git] / client / src / app / header / search-typeahead.component.scss
CommitLineData
8cbc40b2
C
1@use '_mixins' as *;
2@use '_variables' as *;
f409f0c3 3
9b8a7aa8
RK
4#search-video {
5 @include peertube-input-text($search-input-width);
f1ac6348 6
27bc9586
C
7 @include padding-left(10px);
8 @include padding-right(40px); // For the search icon
9
9b8a7aa8
RK
10 font-size: 14px;
11
12 &::placeholder {
e66883b3 13 color: pvar(--inputPlaceholderColor);
9b8a7aa8
RK
14 }
15}
16
f1ac6348 17.icon-search {
9b8a7aa8 18 @include icon(25px);
27bc9586
C
19 @include margin-left(-35px);
20
c41c0e28 21 height: 18px;
9b8a7aa8
RK
22
23 // yolo
24 position: absolute;
c41c0e28
RK
25 margin-top: 3.5px;
26 right: 10px;
9b8a7aa8
RK
27}
28
f409f0c3
RK
29.jump-to-suggestions {
30 top: 100%;
31 left: 0;
d6eace77 32 z-index: z('search-typeahead');
f409f0c3
RK
33 width: 100%;
34}
35
6af662a5 36#typeahead-help,
f409f0c3 37#typeahead-instructions,
5fb2e288 38li.suggestion {
e66883b3 39 border: 1px solid pvar(--mainBackgroundColor);
e66883b3 40 background: pvar(--mainBackgroundColor);
f409f0c3
RK
41 transition: .3s ease;
42 transition-property: box-shadow;
71489890 43 cursor: pointer;
6567e5a7
RK
44
45 // soft border-radius for the last suggestion and the link inside
46 &:last-of-type {
931d3430
C
47 &,
48 ::ng-deep a {
6567e5a7
RK
49 border-bottom-right-radius: 3px;
50 border-bottom-left-radius: 3px;
51 }
52 }
f409f0c3
RK
53}
54
6af662a5 55#typeahead-help,
f409f0c3
RK
56#typeahead-instructions {
57 margin-top: 10px;
58 width: 100%;
59 padding: .5rem 1rem;
6af662a5 60 white-space: normal;
f409f0c3
RK
61
62 ul {
63 list-style: none;
64 padding: 0;
65 margin-bottom: .5rem;
66
67 em {
27bc9586
C
68 @include margin-right(0.2rem);
69
f409f0c3 70 font-weight: 600;
f409f0c3
RK
71 font-style: normal;
72 }
73 }
74}
75
76#typeahead-container {
9b8a7aa8 77 input {
e66883b3 78 border: 1px solid pvar(--mainBackgroundColor) !important;
931d3430 79 box-shadow: rgba(0, 0, 0, 0.1) 0 1px 20px 0;
f409f0c3
RK
80 flex-grow: 1;
81 transition: box-shadow .3s ease, width .2s ease;
82 }
83
9677fca7 84 @media screen and (min-width: $mobile-view) {
27bc9586 85 @include margin-left(10px);
52cc0d54
RK
86 }
87
9677fca7 88 @media screen and (max-width: $small-view) {
52cc0d54
RK
89 flex: 1;
90
9b8a7aa8 91 input {
97c116ed 92 width: 70px;
52cc0d54
RK
93 }
94 }
95
9b8a7aa8 96 span {
f409f0c3
RK
97 right: 10px;
98 }
99
931d3430 100 > div:last-child {
5fb2e288 101 // we have to switch the display and not the opacity,
f409f0c3
RK
102 // to avoid clashing with the rest of the interface.
103 display: none;
104 }
105
106 &:focus,
107 ::ng-deep &:focus-within {
931d3430 108 > div:last-child {
9677fca7 109 @media screen and (min-width: $mobile-view) {
52cc0d54
RK
110 display: initial !important;
111 }
5fb2e288 112
6af662a5 113 #typeahead-help,
f409f0c3 114 #typeahead-instructions,
5fb2e288 115 li.suggestion {
931d3430 116 box-shadow: rgba(0, 0, 0, 0.2) 0 10px 20px -5px;
f409f0c3
RK
117 }
118 }
119
120 ::ng-deep input {
931d3430 121 box-shadow: rgba(0, 0, 0, 0.2) 0 1px 20px 0;
f409f0c3
RK
122 border-end-start-radius: 0;
123 border-end-end-radius: 0;
124
8cbc40b2 125 @media screen and (min-width: 1000px) {
f409f0c3
RK
126 width: 500px;
127 }
128 }
129 }
130}
131
f409f0c3
RK
132.glyphicon {
133 top: 3px;
134}
135
136.advanced-search-status {
6af662a5
RK
137 height: max-content;
138 cursor: default;
139
140 &.c-help {
141 cursor: help;
142 }
f409f0c3
RK
143}
144
145.small-title {
146 @include in-content-small-title;
147
148 margin-bottom: .5rem;
149}
150
6af662a5
RK
151::ng-deep my-suggestion {
152 width: 100%;
f409f0c3 153}