]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/header/search-typeahead.component.scss
Merge remote-tracking branch 'weblate/develop' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / header / search-typeahead.component.scss
CommitLineData
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
9b8a7aa8
RK
9 padding-left: 10px;
10 padding-right: 40px; // For the search icon
11 font-size: 14px;
12
13 &::placeholder {
e66883b3 14 color: pvar(--inputPlaceholderColor);
9b8a7aa8
RK
15 }
16}
17
f1ac6348 18.icon-search {
9b8a7aa8 19 @include icon(25px);
c41c0e28 20 height: 18px;
9b8a7aa8
RK
21
22 // yolo
23 position: absolute;
24 margin-left: -35px;
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 {
68 font-weight: 600;
69 margin-right: 0.2rem;
70 font-style: normal;
71 }
72 }
73}
74
75#typeahead-container {
9b8a7aa8 76 input {
e66883b3 77 border: 1px solid pvar(--mainBackgroundColor) !important;
931d3430 78 box-shadow: rgba(0, 0, 0, 0.1) 0 1px 20px 0;
f409f0c3
RK
79 flex-grow: 1;
80 transition: box-shadow .3s ease, width .2s ease;
81 }
82
9677fca7 83 @media screen and (min-width: $mobile-view) {
52cc0d54
RK
84 margin-left: 10px;
85 }
86
9677fca7 87 @media screen and (max-width: $small-view) {
52cc0d54
RK
88 flex: 1;
89
9b8a7aa8 90 input {
97c116ed 91 width: 70px;
52cc0d54
RK
92 }
93 }
94
9b8a7aa8 95 span {
f409f0c3
RK
96 right: 10px;
97 }
98
931d3430 99 > div:last-child {
5fb2e288 100 // we have to switch the display and not the opacity,
f409f0c3
RK
101 // to avoid clashing with the rest of the interface.
102 display: none;
103 }
104
105 &:focus,
106 ::ng-deep &:focus-within {
931d3430 107 > div:last-child {
9677fca7 108 @media screen and (min-width: $mobile-view) {
52cc0d54
RK
109 display: initial !important;
110 }
5fb2e288 111
6af662a5 112 #typeahead-help,
f409f0c3 113 #typeahead-instructions,
5fb2e288 114 li.suggestion {
931d3430 115 box-shadow: rgba(0, 0, 0, 0.2) 0 10px 20px -5px;
f409f0c3
RK
116 }
117 }
118
119 ::ng-deep input {
931d3430 120 box-shadow: rgba(0, 0, 0, 0.2) 0 1px 20px 0;
f409f0c3
RK
121 border-end-start-radius: 0;
122 border-end-end-radius: 0;
123
9677fca7 124 @include media-breakpoint-up(lg) {
f409f0c3
RK
125 width: 500px;
126 }
127 }
128 }
129}
130
f409f0c3
RK
131.glyphicon {
132 top: 3px;
133}
134
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}