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