]>
Commit | Line | Data |
---|---|---|
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 | 38 | li.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 { | |
4fdc7350 | 77 | font-size: 14px; |
9a3f7250 | 78 | margin: 0 10px; |
4fdc7350 | 79 | |
9b8a7aa8 | 80 | input { |
e66883b3 | 81 | border: 1px solid pvar(--mainBackgroundColor) !important; |
931d3430 | 82 | box-shadow: rgba(0, 0, 0, 0.1) 0 1px 20px 0; |
f409f0c3 RK |
83 | flex-grow: 1; |
84 | transition: box-shadow .3s ease, width .2s ease; | |
85 | } | |
86 | ||
9677fca7 | 87 | @media screen and (max-width: $small-view) { |
9a3f7250 C |
88 | input { |
89 | width: 200px; | |
90 | } | |
91 | } | |
52cc0d54 | 92 | |
9a3f7250 | 93 | @media screen and (max-width: $mobile-view) { |
9b8a7aa8 | 94 | input { |
9a3f7250 | 95 | width: 150px; |
52cc0d54 RK |
96 | } |
97 | } | |
98 | ||
9b8a7aa8 | 99 | span { |
f409f0c3 RK |
100 | right: 10px; |
101 | } | |
102 | ||
931d3430 | 103 | > div:last-child { |
5fb2e288 | 104 | // we have to switch the display and not the opacity, |
f409f0c3 RK |
105 | // to avoid clashing with the rest of the interface. |
106 | display: none; | |
107 | } | |
108 | ||
109 | &:focus, | |
110 | ::ng-deep &:focus-within { | |
931d3430 | 111 | > div:last-child { |
9677fca7 | 112 | @media screen and (min-width: $mobile-view) { |
52cc0d54 RK |
113 | display: initial !important; |
114 | } | |
5fb2e288 | 115 | |
6af662a5 | 116 | #typeahead-help, |
f409f0c3 | 117 | #typeahead-instructions, |
5fb2e288 | 118 | li.suggestion { |
931d3430 | 119 | box-shadow: rgba(0, 0, 0, 0.2) 0 10px 20px -5px; |
f409f0c3 RK |
120 | } |
121 | } | |
122 | ||
123 | ::ng-deep input { | |
931d3430 | 124 | box-shadow: rgba(0, 0, 0, 0.2) 0 1px 20px 0; |
f409f0c3 RK |
125 | border-end-start-radius: 0; |
126 | border-end-end-radius: 0; | |
127 | ||
8cbc40b2 | 128 | @media screen and (min-width: 1000px) { |
f409f0c3 RK |
129 | width: 500px; |
130 | } | |
131 | } | |
132 | } | |
133 | } | |
134 | ||
f409f0c3 | 135 | .advanced-search-status { |
6af662a5 RK |
136 | height: max-content; |
137 | cursor: default; | |
138 | ||
139 | &.c-help { | |
140 | cursor: help; | |
141 | } | |
f409f0c3 RK |
142 | } |
143 | ||
144 | .small-title { | |
145 | @include in-content-small-title; | |
146 | ||
147 | margin-bottom: .5rem; | |
148 | } | |
149 | ||
6af662a5 RK |
150 | ::ng-deep my-suggestion { |
151 | width: 100%; | |
f409f0c3 | 152 | } |