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