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