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