]>
Commit | Line | Data |
---|---|---|
8cbc40b2 C |
1 | @use '_variables' as *; |
2 | @use '_mixins' as *; | |
3 | ||
4 | @import './_bootstrap-variables'; | |
5 | ||
6 | @import '~bootstrap/scss/functions'; | |
7 | @import '~bootstrap/scss/variables'; | |
8cbc40b2 | 8 | @import '~bootstrap/scss/mixins'; |
4c8749cb C |
9 | @import '~bootstrap/scss/utilities'; |
10 | ||
8cbc40b2 C |
11 | @import '~bootstrap/scss/root'; |
12 | @import '~bootstrap/scss/reboot'; | |
13 | @import '~bootstrap/scss/type'; | |
14 | @import '~bootstrap/scss/grid'; | |
8cbc40b2 C |
15 | @import '~bootstrap/scss/forms'; |
16 | @import '~bootstrap/scss/buttons'; | |
17 | @import '~bootstrap/scss/dropdown'; | |
18 | @import '~bootstrap/scss/button-group'; | |
8cbc40b2 C |
19 | @import '~bootstrap/scss/nav'; |
20 | @import '~bootstrap/scss/card'; | |
4c8749cb | 21 | @import '~bootstrap/scss/accordion'; |
8cbc40b2 C |
22 | @import '~bootstrap/scss/alert'; |
23 | @import '~bootstrap/scss/close'; | |
24 | @import '~bootstrap/scss/modal'; | |
25 | @import '~bootstrap/scss/tooltip'; | |
26 | @import '~bootstrap/scss/popover'; | |
a14c1764 | 27 | @import '~bootstrap/scss/spinners'; |
4c8749cb C |
28 | |
29 | @import '~bootstrap/scss/helpers'; | |
30 | @import '~bootstrap/scss/utilities/api'; | |
8cbc40b2 | 31 | |
f409f0c3 RK |
32 | .flex-auto { |
33 | flex: auto; | |
34 | } | |
35 | ||
d3217560 | 36 | .c-hand { |
4c8749cb | 37 | cursor: pointer !important; |
d3217560 RK |
38 | } |
39 | ||
5efa5df2 C |
40 | // --------------------------------------------------------------------------- |
41 | // Dropdown | |
42 | // --------------------------------------------------------------------------- | |
43 | ||
2f4c784a | 44 | .dropdown-menu { |
2f4c784a | 45 | font-size: 15px; |
b788e691 C |
46 | color: pvar(--mainForegroundColor); |
47 | background-color: pvar(--mainBackgroundColor); | |
48 | ||
0d3a2982 | 49 | .dropdown-header { |
27bc9586 | 50 | @include padding-left(1rem); |
0d3a2982 RK |
51 | } |
52 | ||
2f4c784a C |
53 | .dropdown-item { |
54 | padding: 3px 15px; | |
55 | ||
24e7916c | 56 | &.active { |
e66883b3 RK |
57 | color: pvar(--mainBackgroundColor) !important; |
58 | background-color: pvar(--mainHoverColor); | |
931d3430 | 59 | opacity: 0.9; |
2f4c784a | 60 | } |
45c6bcf3 | 61 | |
d3217560 RK |
62 | &::after { |
63 | display: none; | |
64 | } | |
2f4c784a C |
65 | } |
66 | ||
2f4c784a C |
67 | a { |
68 | @include disable-default-a-behaviour; | |
2f4c784a C |
69 | } |
70 | } | |
71 | ||
5efa5df2 C |
72 | .dropdown-divider { |
73 | margin: 0.3rem 0; | |
74 | } | |
75 | ||
76 | // --------------------------------------------------------------------------- | |
77 | // Modal | |
78 | // --------------------------------------------------------------------------- | |
79 | ||
165ee292 | 80 | @media screen and (min-width: #{breakpoint(md)}) { |
931d3430 | 81 | .modal::before { |
3921166d | 82 | vertical-align: middle; |
931d3430 | 83 | content: ' '; |
3921166d RK |
84 | height: 100%; |
85 | } | |
86 | ||
87 | .modal-dialog { | |
27bc9586 | 88 | text-align: start; |
2bc9bd08 RK |
89 | |
90 | &:not(.modal-lg):not(.modal-xl) { | |
91 | min-width: 500px; | |
92 | width: 40vw; | |
93 | max-width: 900px; | |
94 | } | |
3921166d RK |
95 | } |
96 | } | |
97 | ||
2f4c784a | 98 | .modal { |
3921166d RK |
99 | text-align: center; |
100 | ||
2f4c784a | 101 | .modal-content { |
e66883b3 | 102 | background-color: pvar(--mainBackgroundColor); |
681276a6 | 103 | word-break: break-word; |
2f4c784a C |
104 | } |
105 | ||
106 | .modal-header { | |
931d3430 | 107 | border-bottom: 0; |
2f4c784a C |
108 | margin-bottom: 5px; |
109 | ||
110 | .modal-title { | |
111 | font-size: 20px; | |
112 | font-weight: $font-semibold; | |
113 | } | |
114 | ||
115 | my-global-icon { | |
54e78847 | 116 | @include icon(22px); |
2f4c784a C |
117 | |
118 | position: relative; | |
54e78847 | 119 | top: 5px; |
2f4c784a C |
120 | float: right; |
121 | ||
122 | margin: 0; | |
123 | padding: 0; | |
931d3430 | 124 | opacity: 0.5; |
8319d6ae | 125 | |
931d3430 | 126 | &[iconName=cross] { /* stylelint-disable-line selector-max-compound-selectors */ |
8319d6ae | 127 | @include icon(16px); |
931d3430 | 128 | |
8319d6ae RK |
129 | top: -3px; |
130 | } | |
2f4c784a C |
131 | } |
132 | } | |
133 | ||
134 | .inputs { | |
135 | margin-bottom: 0; | |
27bc9586 | 136 | text-align: end; |
2f4c784a | 137 | |
26490335 | 138 | > *:not(:first-child) { |
27bc9586 | 139 | @include margin-left(10px); |
2f4c784a C |
140 | } |
141 | } | |
142 | } | |
143 | ||
8110705d | 144 | |
145 | // On desktop browsers, make the content and header horizontally sticked to right not move when modal open and close | |
146 | .modal-open { | |
147 | overflow-y: scroll !important; // Make sure vertical scroll bar is always visible on desktop browsers to get disabled scrollbar effect | |
17384fd8 | 148 | width: 100vw; // Make sure the content fits all the available width |
8110705d | 149 | } |
150 | ||
245b9d27 K |
151 | // On touchscreen devices, simply overflow: hidden to avoid detached overlay on scroll |
152 | @media (hover: none) and (pointer: coarse) { | |
931d3430 C |
153 | .modal-open, |
154 | .menu-open { | |
245b9d27 K |
155 | overflow: hidden !important; |
156 | } | |
157 | ||
158 | // On touchscreen devices display content overlay when opened menu | |
159 | .menu-open { | |
160 | .main-col { | |
161 | &::before { | |
931d3430 | 162 | background-color: #000; |
245b9d27 K |
163 | width: 100vw; |
164 | height: 100vh; | |
165 | opacity: 0.75; | |
166 | content: ''; | |
167 | display: block; | |
168 | position: fixed; | |
43599029 | 169 | z-index: z(overlay); |
245b9d27 K |
170 | } |
171 | } | |
172 | } | |
173 | } | |
174 | ||
5efa5df2 C |
175 | // --------------------------------------------------------------------------- |
176 | // Nav | |
177 | // --------------------------------------------------------------------------- | |
178 | ||
2f4c784a C |
179 | .nav .nav-link { |
180 | display: flex !important; | |
181 | align-items: center; | |
182 | height: 30px !important; | |
183 | padding: 10px 15px !important; | |
184 | } | |
185 | ||
186 | .nav.nav-pills { | |
187 | font-size: 16px !important; | |
ed5bb517 | 188 | font-weight: $font-semibold !important; |
2f4c784a | 189 | |
ed5bb517 K |
190 | .nav-link { |
191 | opacity: 0.6 !important; | |
192 | ||
931d3430 C |
193 | &.active, |
194 | &:hover, | |
195 | &:active, | |
196 | &:focus { | |
ed5bb517 K |
197 | opacity: 1 !important; |
198 | } | |
2f4c784a C |
199 | } |
200 | ||
201 | a { | |
202 | @include disable-default-a-behaviour; | |
203 | ||
e66883b3 | 204 | color: pvar(--mainForegroundColor); |
2f4c784a C |
205 | } |
206 | } | |
207 | ||
ed5bb517 K |
208 | .nav-tabs .nav-link { |
209 | @include disable-default-a-behaviour; | |
2f4c784a | 210 | |
ed5bb517 K |
211 | color: pvar(--mainForegroundColor); |
212 | font-weight: $font-semibold; | |
931d3430 | 213 | border: 0; |
ed5bb517 K |
214 | border-bottom: 2px solid transparent; |
215 | opacity: 0.6; | |
2f4c784a | 216 | |
758f0d19 | 217 | &.active { |
ed5bb517 | 218 | color: pvar(--mainForegroundColor); |
e66883b3 | 219 | background-color: pvar(--mainBackgroundColor) !important; |
ed5bb517 | 220 | border-bottom-color: pvar(--mainColor); |
758f0d19 | 221 | } |
ed5bb517 | 222 | |
931d3430 C |
223 | &.active, |
224 | &:hover, | |
225 | &:active, | |
226 | &:focus { | |
ed5bb517 | 227 | opacity: 1; |
758f0d19 | 228 | } |
2f4c784a C |
229 | } |
230 | ||
5efa5df2 C |
231 | // --------------------------------------------------------------------------- |
232 | // Card, collapse and accordion | |
233 | // --------------------------------------------------------------------------- | |
234 | ||
a4610bc6 | 235 | .card { |
e66883b3 | 236 | background-color: pvar(--mainBackgroundColor); |
a4610bc6 JM |
237 | border-color: #dee2e6; |
238 | } | |
239 | ||
2f4c784a C |
240 | .collapse-transition { |
241 | // Animation when we show/hide the filters | |
242 | transition: max-height 0.3s; | |
243 | display: block !important; | |
244 | overflow: hidden !important; | |
245 | max-height: 0; | |
246 | ||
247 | &.show { | |
248 | max-height: 1500px; | |
dd24f1bb | 249 | overflow: inherit !important; |
2f4c784a C |
250 | } |
251 | } | |
bc584963 | 252 | |
5efa5df2 C |
253 | // --------------------------------------------------------------------------- |
254 | // Buttons & form controls | |
255 | // --------------------------------------------------------------------------- | |
000eb0e4 | 256 | |
947d0102 RK |
257 | .btn-outline-secondary { |
258 | border-color: $input-border-color; | |
259 | ||
260 | &:focus-within, | |
261 | &:focus, | |
262 | &:hover { | |
263 | color: #fff; | |
264 | background-color: #6c757d; | |
265 | } | |
266 | } | |
267 | ||
a8454bb2 | 268 | .btn-group.select-button { |
2accfdd8 C |
269 | font-weight: $font-semibold; |
270 | ||
271 | .active { | |
272 | @include orange-button; | |
273 | } | |
274 | ||
275 | :not(.active) { | |
276 | @include grey-button; | |
277 | } | |
278 | ||
279 | > * { | |
280 | @include peertube-button-link; | |
281 | ||
282 | box-shadow: none !important; | |
283 | ||
284 | &:not(:first-child) { | |
285 | border-top-left-radius: 0 !important; | |
286 | border-bottom-left-radius: 0 !important; | |
287 | } | |
288 | ||
289 | &:not(:last-child) { | |
290 | border-top-right-radius: 0 !important; | |
291 | border-bottom-right-radius: 0 !important; | |
292 | } | |
293 | } | |
294 | } | |
295 | ||
a6d5ff76 RK |
296 | .form-control { |
297 | font-size: 15px; | |
e66883b3 RK |
298 | color: pvar(--mainForegroundColor); |
299 | background-color: pvar(--inputBackgroundColor); | |
a6d5ff76 RK |
300 | outline: none; |
301 | ||
5efa5df2 | 302 | // Input box-shadow on focus |
a6d5ff76 RK |
303 | &:focus-within, |
304 | &:focus { | |
e66883b3 | 305 | box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest); |
a6d5ff76 RK |
306 | |
307 | &.input-error { | |
6a4c30de | 308 | box-shadow: #{$focus-box-shadow-form} #{scale-color($red, $alpha: -75%)}; |
a6d5ff76 RK |
309 | } |
310 | } | |
311 | } | |
947d0102 | 312 | |
0d3a2982 | 313 | .input-group { |
4c8749cb C |
314 | > .btn, |
315 | > .input-group-text { | |
316 | height: $button-height; | |
0d3a2982 | 317 | } |
931d3430 | 318 | |
4c8749cb C |
319 | > .input-group-text { |
320 | font-size: 15px; | |
321 | line-height: normal; | |
322 | opacity: 0.9; | |
0d3a2982 RK |
323 | } |
324 | ||
4c8749cb C |
325 | .input-group-text > .dropdown-toggle { |
326 | display: flex; | |
327 | } | |
328 | ||
329 | .last-in-group { | |
330 | border-top-right-radius: 3px !important; | |
331 | border-bottom-right-radius: 3px !important; | |
0d3a2982 | 332 | } |
947d0102 | 333 | } |
25a42e29 | 334 | |
4c8749cb | 335 | .has-clear { |
25a42e29 RK |
336 | position: relative; |
337 | ||
338 | input { | |
27bc9586 | 339 | @include padding-right(1.5rem !important); |
25a42e29 RK |
340 | } |
341 | ||
342 | .form-control-clear { | |
343 | color: rgba(0, 0, 0, 0.4); | |
25a42e29 RK |
344 | display: flex; |
345 | justify-content: center; | |
346 | align-items: center; | |
347 | position: absolute; | |
348 | right: .5rem; | |
349 | height: 95%; | |
4f5d0459 | 350 | font-size: 14px; |
25a42e29 RK |
351 | |
352 | &:hover { | |
353 | color: rgba(0, 0, 0, 0.7); | |
354 | cursor: pointer; | |
355 | } | |
356 | } | |
357 | ||
358 | input:placeholder-shown + .form-control-clear { | |
359 | display: none; | |
360 | } | |
361 | } |