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