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