]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/bootstrap.scss
Translated using Weblate (Chinese (Simplified))
[github/Chocobozzz/PeerTube.git] / client / src / sass / bootstrap.scss
CommitLineData
2f4c784a 1$icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
2f4c784a 2
8cbc40b2
C
3@use '_variables' as *;
4@use '_mixins' as *;
5
6@import './_bootstrap-variables';
7
8@import '~bootstrap/scss/functions';
9@import '~bootstrap/scss/variables';
10
11@import '~bootstrap/scss/mixins';
12@import '~bootstrap/scss/root';
13@import '~bootstrap/scss/reboot';
14@import '~bootstrap/scss/type';
15@import '~bootstrap/scss/grid';
16@import '~bootstrap/scss/tables';
17@import '~bootstrap/scss/forms';
18@import '~bootstrap/scss/buttons';
19@import '~bootstrap/scss/dropdown';
20@import '~bootstrap/scss/button-group';
21@import '~bootstrap/scss/input-group';
22@import '~bootstrap/scss/nav';
23@import '~bootstrap/scss/card';
24@import '~bootstrap/scss/badge';
25@import '~bootstrap/scss/alert';
26@import '~bootstrap/scss/close';
27@import '~bootstrap/scss/modal';
28@import '~bootstrap/scss/tooltip';
29@import '~bootstrap/scss/popover';
30@import '~bootstrap/scss/utilities';
31
32@import '~@neos21/bootstrap3-glyphicons/assets/stylesheets/bootstrap3-glyphicons';
2f4c784a
C
33
34// Thanks https://gist.github.com/alexandrevicenzi/680147013e902a4eaa5d
35.glyphicon-refresh-animate {
931d3430 36 animation: spin 0.7s infinite linear;
2f4c784a
C
37}
38
6b1ef956 39.glyphicon-duplicate {
40 font-size: 70%;
41}
42
f409f0c3
RK
43.flex-auto {
44 flex: auto;
45}
46
d3217560
RK
47.c-hand {
48 cursor: pointer;
49}
50
2f4c784a 51@keyframes spin {
a3705089
C
52 from {
53 transform: scale(1) rotate(0deg);
54 }
931d3430 55
a3705089
C
56 to {
57 transform: scale(1) rotate(360deg);
58 }
2f4c784a
C
59}
60
d4132d3f
RK
61.btn-group > .btn:not(:first-child) {
62 border-top-left-radius: 0 !important;
63 border-bottom-left-radius: 0 !important;
64}
65
2f4c784a
C
66.dropdown-menu {
67 border-radius: 3px;
6f6e89db 68 box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
2f4c784a
C
69 font-size: 15px;
70
b788e691
C
71 color: pvar(--mainForegroundColor);
72 background-color: pvar(--mainBackgroundColor);
73
0d3a2982 74 .dropdown-header {
27bc9586 75 @include padding-left(1rem);
0d3a2982
RK
76 }
77
2f4c784a
C
78 .dropdown-item {
79 padding: 3px 15px;
80
b788e691
C
81 color: pvar(--mainForegroundColor);
82 background-color: pvar(--mainBackgroundColor);
83
24e7916c 84 &.active {
e66883b3
RK
85 color: pvar(--mainBackgroundColor) !important;
86 background-color: pvar(--mainHoverColor);
931d3430 87 opacity: 0.9;
2f4c784a 88 }
45c6bcf3 89
b788e691
C
90 a:active,
91 &:hover {
0aa52e17 92 color: pvar(--mainForegroundColor) !important;
b788e691 93 background-color: pvar(--mainBackgroundHoverColor);
0aa52e17
C
94 }
95
d3217560
RK
96 &::after {
97 display: none;
98 }
2f4c784a
C
99 }
100
101 button {
102 @include disable-default-a-behaviour;
103 }
104
105 a {
106 @include disable-default-a-behaviour;
2f4c784a
C
107 }
108}
109
26171379
C
110.badge {
111 line-height: 1.1;
112}
3921166d 113
165ee292 114@media screen and (min-width: #{breakpoint(md)}) {
931d3430 115 .modal::before {
3921166d 116 vertical-align: middle;
931d3430 117 content: ' ';
3921166d
RK
118 height: 100%;
119 }
120
121 .modal-dialog {
27bc9586 122 text-align: start;
2bc9bd08
RK
123
124 &:not(.modal-lg):not(.modal-xl) {
125 min-width: 500px;
126 width: 40vw;
127 max-width: 900px;
128 }
3921166d
RK
129 }
130}
131
2f4c784a 132.modal {
3921166d
RK
133 text-align: center;
134
2f4c784a 135 .modal-content {
e66883b3 136 background-color: pvar(--mainBackgroundColor);
681276a6 137 word-break: break-word;
2f4c784a
C
138 }
139
140 .modal-header {
931d3430 141 border-bottom: 0;
2f4c784a
C
142 margin-bottom: 5px;
143
144 .modal-title {
145 font-size: 20px;
146 font-weight: $font-semibold;
147 }
148
149 my-global-icon {
54e78847 150 @include icon(22px);
2f4c784a
C
151
152 position: relative;
54e78847 153 top: 5px;
2f4c784a
C
154 float: right;
155
156 margin: 0;
157 padding: 0;
931d3430 158 opacity: 0.5;
8319d6ae 159
931d3430 160 &[iconName=cross] { /* stylelint-disable-line selector-max-compound-selectors */
8319d6ae 161 @include icon(16px);
931d3430 162
8319d6ae
RK
163 top: -3px;
164 }
2f4c784a
C
165 }
166 }
167
168 .inputs {
169 margin-bottom: 0;
27bc9586 170 text-align: end;
2f4c784a 171
26490335 172 > *:not(:first-child) {
27bc9586 173 @include margin-left(10px);
2f4c784a
C
174 }
175 }
176}
177
8110705d 178
179// On desktop browsers, make the content and header horizontally sticked to right not move when modal open and close
180.modal-open {
181 overflow-y: scroll !important; // Make sure vertical scroll bar is always visible on desktop browsers to get disabled scrollbar effect
17384fd8 182 width: 100vw; // Make sure the content fits all the available width
8110705d 183}
184
245b9d27
K
185// On touchscreen devices, simply overflow: hidden to avoid detached overlay on scroll
186@media (hover: none) and (pointer: coarse) {
931d3430
C
187 .modal-open,
188 .menu-open {
245b9d27
K
189 overflow: hidden !important;
190 }
191
192 // On touchscreen devices display content overlay when opened menu
193 .menu-open {
194 .main-col {
195 &::before {
931d3430 196 background-color: #000;
245b9d27
K
197 width: 100vw;
198 height: 100vh;
199 opacity: 0.75;
200 content: '';
201 display: block;
202 position: fixed;
43599029 203 z-index: z(overlay);
245b9d27
K
204 }
205 }
206 }
207}
208
2f4c784a
C
209// Nav customizations
210.nav .nav-link {
211 display: flex !important;
212 align-items: center;
213 height: 30px !important;
214 padding: 10px 15px !important;
215}
216
217.nav.nav-pills {
218 font-size: 16px !important;
ed5bb517 219 font-weight: $font-semibold !important;
2f4c784a 220
ed5bb517
K
221 .nav-link {
222 opacity: 0.6 !important;
223
931d3430
C
224 &.active,
225 &:hover,
226 &:active,
227 &:focus {
ed5bb517
K
228 opacity: 1 !important;
229 }
2f4c784a
C
230 }
231
232 a {
233 @include disable-default-a-behaviour;
234
e66883b3 235 color: pvar(--mainForegroundColor);
2f4c784a
C
236 }
237}
238
ed5bb517
K
239.nav-tabs .nav-link {
240 @include disable-default-a-behaviour;
2f4c784a 241
ed5bb517
K
242 color: pvar(--mainForegroundColor);
243 font-weight: $font-semibold;
931d3430 244 border: 0;
ed5bb517
K
245 border-bottom: 2px solid transparent;
246 opacity: 0.6;
2f4c784a 247
758f0d19 248 &.active {
ed5bb517 249 color: pvar(--mainForegroundColor);
e66883b3 250 background-color: pvar(--mainBackgroundColor) !important;
ed5bb517 251 border-bottom-color: pvar(--mainColor);
758f0d19 252 }
ed5bb517 253
931d3430
C
254 &.active,
255 &:hover,
256 &:active,
257 &:focus {
ed5bb517 258 opacity: 1;
758f0d19 259 }
2f4c784a
C
260}
261
a4610bc6 262.card {
e66883b3 263 background-color: pvar(--mainBackgroundColor);
a4610bc6
JM
264 border-color: #dee2e6;
265}
266
2f4c784a
C
267.collapse-transition {
268 // Animation when we show/hide the filters
269 transition: max-height 0.3s;
270 display: block !important;
271 overflow: hidden !important;
272 max-height: 0;
273
274 &.show {
275 max-height: 1500px;
dd24f1bb 276 overflow: inherit !important;
2f4c784a
C
277 }
278}
bc584963
RK
279
280.dropdown-divider {
281 margin: 0.3rem 0;
000eb0e4
RK
282}
283
947d0102
RK
284.btn-outline-secondary {
285 border-color: $input-border-color;
286
287 &:focus-within,
288 &:focus,
289 &:hover {
290 color: #fff;
291 background-color: #6c757d;
292 }
293}
294
aa0f1963 295.btn-outline-tertiary {
e66883b3
RK
296 color: pvar(--secondaryColor);
297 border-color: pvar(--secondaryColor);
a3705089 298
947d0102
RK
299 &:focus-within,
300 &:focus,
aa0f1963 301 &:hover {
e66883b3
RK
302 color: pvar(--mainBackgroundColor);
303 background-color: pvar(--secondaryColor);
aa0f1963
RK
304 }
305}
a6d5ff76 306
a8454bb2 307.btn-group.select-button {
2accfdd8
C
308 font-weight: $font-semibold;
309
310 .active {
311 @include orange-button;
312 }
313
314 :not(.active) {
315 @include grey-button;
316 }
317
318 > * {
319 @include peertube-button-link;
320
321 box-shadow: none !important;
322
323 &:not(:first-child) {
324 border-top-left-radius: 0 !important;
325 border-bottom-left-radius: 0 !important;
326 }
327
328 &:not(:last-child) {
329 border-top-right-radius: 0 !important;
330 border-bottom-right-radius: 0 !important;
331 }
332 }
333}
334
a6d5ff76
RK
335// input box-shadow on focus
336.form-control {
337 font-size: 15px;
e66883b3
RK
338 color: pvar(--mainForegroundColor);
339 background-color: pvar(--inputBackgroundColor);
a6d5ff76
RK
340 outline: none;
341
342 &:focus-within,
343 &:focus {
e66883b3 344 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
a6d5ff76
RK
345
346 &.input-error {
6a4c30de 347 box-shadow: #{$focus-box-shadow-form} #{scale-color($red, $alpha: -75%)};
a6d5ff76
RK
348 }
349 }
350}
947d0102 351
0d3a2982 352.input-group {
931d3430 353 > .form-control {
0d3a2982
RK
354 flex: initial;
355 }
931d3430 356
25a42e29
RK
357 input.form-control {
358 width: unset !important;
359 flex-grow: 1;
0d3a2982
RK
360 }
361
362 .input-group-prepend + input {
363 border-top-left-radius: 0 !important;
364 border-bottom-left-radius: 0 !important;
365 }
947d0102 366}
25a42e29
RK
367
368.has-feedback.has-clear {
369 position: relative;
370
371 input {
27bc9586 372 @include padding-right(1.5rem !important);
25a42e29
RK
373 }
374
375 .form-control-clear {
376 color: rgba(0, 0, 0, 0.4);
377 /*
378 * Enable pointer events as they have been disabled since Bootstrap 3.3
379 * See https://github.com/twbs/bootstrap/pull/14104
380 */
381 pointer-events: all;
382 display: flex;
383 justify-content: center;
384 align-items: center;
385 position: absolute;
386 right: .5rem;
387 height: 95%;
4f5d0459 388 font-size: 14px;
25a42e29
RK
389
390 &:hover {
391 color: rgba(0, 0, 0, 0.7);
392 cursor: pointer;
393 }
394 }
395
396 input:placeholder-shown + .form-control-clear {
397 display: none;
398 }
399}
ea5cdc11
RK
400
401.callout {
728a1236
RK
402 padding: 1.25rem;
403 border: 1px solid #eee;
ea5cdc11
RK
404 border-radius: .25rem;
405
931d3430 406 > label {
ea5cdc11
RK
407 position: relative;
408 top: -5px;
409 left: -10px;
410 color: #6c757d !important;
411 }
412
413 &:not(.callout-light) {
414 border-left-width: .25rem;
415 }
26171379 416
ea5cdc11
RK
417 &.callout-info {
418 border-color: pvar(--mainColorLightest);
419 border-left-color: pvar(--mainColor);
420 }
421}
27bc9586
C
422
423// Override these properties for Bidi support
424@each $size, $length in $spacers {
425 .ml-#{$size} {
426 @include margin-left($length);
427 }
428
429 .mr-#{$size} {
430 @include margin-right($length);
431 }
432
433 .pl-#{$size} {
434 @include padding-left($length);
435 }
436
437 .pr-#{$size} {
438 @include padding-right($length);
439 }
440}