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