]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/sass/bootstrap.scss
Translated using Weblate (Ukrainian)
[github/Chocobozzz/PeerTube.git] / client / src / sass / bootstrap.scss
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/transitions';
19 @import 'bootstrap/scss/dropdown';
20 @import 'bootstrap/scss/button-group';
21 @import 'bootstrap/scss/nav';
22 @import 'bootstrap/scss/card';
23 @import 'bootstrap/scss/accordion';
24 @import 'bootstrap/scss/alert';
25 @import 'bootstrap/scss/close';
26 @import 'bootstrap/scss/modal';
27 @import 'bootstrap/scss/tooltip';
28 @import 'bootstrap/scss/popover';
29 @import 'bootstrap/scss/spinners';
30
31 @import 'bootstrap/scss/helpers';
32 @import 'bootstrap/scss/utilities/api';
33
34 body {
35 --bs-border-color-translucent: #{pvar(--inputBorderColor)};
36 }
37
38 .accordion {
39 --bs-accordion-color: #{pvar(--mainForegroundColor)};
40 --bs-accordion-bg: #{pvar(--mainBackgroundColor)};
41
42 --bs-accordion-btn-color: var(--bs-accordion-color);
43 --bs-accordion-btn-bg: var(--bs-accordion-bg);
44 }
45
46 .popover {
47 --bs-popover-bg: #{pvar(--mainBackgroundColor)};
48 --bs-popover-body-color: #{pvar(--mainForegroundColor)};
49 --bs-popover-header-color: #{pvar(--mainForegroundColor)};
50
51 font-family: $main-fonts;
52 }
53
54 .flex-auto {
55 flex: auto;
56 }
57
58 .c-hand {
59 cursor: pointer !important;
60 }
61
62 // ---------------------------------------------------------------------------
63 // Dropdown
64 // ---------------------------------------------------------------------------
65
66 .dropdown-menu {
67 --bs-dropdown-link-hover-bg: #{pvar(--mainBackgroundHoverColor)};
68 --bs-dropdown-link-color: #{pvar(--mainForegroundColor)};
69 --bs-dropdown-border-color: #{pvar(--inputBorderColor)};
70
71 .dropdown-header {
72 @include padding-left(1rem);
73 }
74
75 .dropdown-item {
76 padding: 3px 15px;
77
78 &.active {
79 color: pvar(--mainBackgroundColor) !important;
80 background-color: pvar(--mainHoverColor);
81 opacity: 0.9;
82 }
83
84 &::after {
85 display: none;
86 }
87 }
88
89 a {
90 @include disable-default-a-behaviour;
91 }
92 }
93
94 .dropdown-divider {
95 margin: 0.3rem 0;
96 }
97
98 // ---------------------------------------------------------------------------
99 // Alert
100 // ---------------------------------------------------------------------------
101
102 .alert {
103 p:last-child {
104 margin-bottom: 0;
105 }
106 }
107
108 // ---------------------------------------------------------------------------
109 // Modal
110 // ---------------------------------------------------------------------------
111
112 @media screen and (min-width: #{breakpoint(md)}) {
113 .modal::before {
114 vertical-align: middle;
115 content: ' ';
116 height: 100%;
117 }
118
119 .modal-dialog {
120 text-align: start;
121
122 &:not(.modal-lg):not(.modal-xl) {
123 min-width: 500px;
124 width: 40vw;
125 max-width: 900px;
126 }
127 }
128 }
129
130 .modal {
131 text-align: center;
132
133 .modal-content {
134 background-color: pvar(--mainBackgroundColor);
135 word-break: break-word;
136 }
137
138 .modal-header {
139 border-bottom: 0;
140 margin-bottom: 5px;
141
142 .modal-title {
143 font-size: 20px;
144 font-weight: $font-semibold;
145 }
146
147 my-global-icon {
148 @include icon(22px);
149
150 opacity: 0.5;
151
152 &:hover {
153 opacity: 0.8;
154 }
155 }
156 }
157
158 .inputs {
159 margin-bottom: 0;
160 text-align: end;
161
162 > *:not(:first-child) {
163 @include margin-left(10px);
164 }
165 }
166 }
167
168
169 // On desktop browsers, make the content and header horizontally sticked to right not move when modal open and close
170 .modal-open {
171 overflow-y: scroll !important; // Make sure vertical scroll bar is always visible on desktop browsers to get disabled scrollbar effect
172 width: 100vw; // Make sure the content fits all the available width
173 }
174
175 // On touchscreen devices, simply overflow: hidden to avoid detached overlay on scroll
176 @media (hover: none) and (pointer: coarse) {
177 .modal-open,
178 .menu-open {
179 overflow: hidden !important;
180 }
181
182 // On touchscreen devices display content overlay when opened menu
183 .menu-open {
184 .main-col {
185 &::before {
186 background-color: #000;
187 width: 100vw;
188 height: 100vh;
189 opacity: 0.75;
190 content: '';
191 display: block;
192 position: fixed;
193 z-index: z(overlay);
194 }
195 }
196 }
197 }
198
199 // ---------------------------------------------------------------------------
200 // Nav
201 // ---------------------------------------------------------------------------
202
203 .nav .nav-link {
204 display: flex !important;
205 align-items: center;
206 height: 30px !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 .accordion-button {
264 font-size: 18px;
265
266 &:not(.collapsed) {
267 font-weight: $font-bold;
268
269 my-global-icon {
270 color: pvar(--mainColorLighter);
271 }
272 }
273 }
274
275 // ---------------------------------------------------------------------------
276 // Buttons & form controls
277 // ---------------------------------------------------------------------------
278
279 .btn:not(.btn-sm) {
280 font-size: $button-font-size;
281 line-height: 1.2;
282 }
283
284 .btn-outline-secondary {
285 border-color: pvar(--inputBorderColor);
286
287 &:focus-within,
288 &:focus,
289 &:hover {
290 color: #fff;
291 background-color: #6c757d;
292 }
293 }
294
295 .btn-group.select-button {
296 font-weight: $font-semibold;
297
298 .active {
299 @include orange-button;
300 }
301
302 :not(.active) {
303 @include grey-button;
304 }
305
306 > * {
307 @include peertube-button-link;
308
309 box-shadow: none !important;
310
311 &:not(:first-child) {
312 border-top-left-radius: 0 !important;
313 border-bottom-left-radius: 0 !important;
314 }
315
316 &:not(:last-child) {
317 border-top-right-radius: 0 !important;
318 border-bottom-right-radius: 0 !important;
319 }
320 }
321 }
322
323 .form-control {
324 color: pvar(--mainForegroundColor);
325 background-color: pvar(--inputBackgroundColor);
326 outline: none;
327 }
328
329 .input-group {
330 > .btn,
331 > .input-group-text {
332 padding-top: 4px;
333 padding-bottom: 4px;
334 }
335
336 > .input-group-text {
337 line-height: normal;
338 opacity: 0.9;
339 }
340
341 .input-group-text > .dropdown-toggle {
342 display: flex;
343 }
344 }
345
346 .input-group,
347 .btn-group {
348 .last-in-group {
349 border-top-right-radius: 3px !important;
350 border-bottom-right-radius: 3px !important;
351 }
352 }
353
354 .has-clear {
355 input {
356 @include padding-right(1.5rem !important);
357 }
358
359 .form-control-clear {
360 display: flex;
361 justify-content: center;
362 align-items: center;
363 height: 95%;
364 font-size: 14px;
365 position: absolute;
366 right: .5rem;
367 opacity: 0.4;
368
369 &:hover {
370 opacity: 0.7;
371 cursor: pointer;
372 }
373 }
374
375 input:placeholder-shown + .form-control-clear {
376 display: none;
377 }
378 }
379
380 .text-truncate {
381 // Prevent invalid height in parent: https://stackoverflow.com/a/22425601
382 vertical-align: top;
383 }