]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/bootstrap.scss
Translated using Weblate (Thai)
[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
757ffdfe 61/* rules for dropdowns excepts when in button group, to avoid impacting the dropdown-toggle */
2856af48 62.dropdown {
f8cce49c 63 z-index: z(dropdown) !important;
2856af48 64}
26ede95e 65
2856af48
C
66.list-overflow-menu,
67.parent-entry {
68 z-index: z(header) - 1 !important;
eb7c7a51
RK
69}
70
2856af48
C
71.btn-group,
72.dropdown-root,
73.action-dropdown,
74.input-group-prepend,
75.column-toggle {
76 z-index: inherit !important;
77}
78
d4132d3f
RK
79.btn-group > .btn:not(:first-child) {
80 border-top-left-radius: 0 !important;
81 border-bottom-left-radius: 0 !important;
82}
83
2f4c784a 84.dropdown-menu {
e0433a5f
C
85 z-index: z(dropdown) + 1 !important;
86
2f4c784a 87 border-radius: 3px;
6f6e89db 88 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
89 font-size: 15px;
90
0d3a2982 91 .dropdown-header {
27bc9586 92 @include padding-left(1rem);
0d3a2982
RK
93 }
94
2f4c784a
C
95 .dropdown-item {
96 padding: 3px 15px;
97
24e7916c 98 &.active {
e66883b3
RK
99 color: pvar(--mainBackgroundColor) !important;
100 background-color: pvar(--mainHoverColor);
931d3430 101 opacity: 0.9;
2f4c784a 102 }
45c6bcf3 103
0aa52e17
C
104 &:active {
105 color: pvar(--mainForegroundColor) !important;
106 }
107
d3217560
RK
108 &::after {
109 display: none;
110 }
2f4c784a
C
111 }
112
113 button {
114 @include disable-default-a-behaviour;
115 }
116
117 a {
118 @include disable-default-a-behaviour;
119 color: #000 !important;
120 }
121}
122
26171379
C
123.badge {
124 line-height: 1.1;
125}
3921166d 126
165ee292 127@media screen and (min-width: #{breakpoint(md)}) {
931d3430 128 .modal::before {
3921166d 129 vertical-align: middle;
931d3430 130 content: ' ';
3921166d
RK
131 height: 100%;
132 }
133
134 .modal-dialog {
27bc9586 135 text-align: start;
2bc9bd08
RK
136
137 &:not(.modal-lg):not(.modal-xl) {
138 min-width: 500px;
139 width: 40vw;
140 max-width: 900px;
141 }
3921166d
RK
142 }
143}
144
2f4c784a 145.modal {
3921166d
RK
146 text-align: center;
147
2f4c784a 148 .modal-content {
e66883b3 149 background-color: pvar(--mainBackgroundColor);
681276a6 150 word-break: break-word;
2f4c784a
C
151 }
152
153 .modal-header {
931d3430 154 border-bottom: 0;
2f4c784a
C
155 margin-bottom: 5px;
156
157 .modal-title {
158 font-size: 20px;
159 font-weight: $font-semibold;
160 }
161
162 my-global-icon {
54e78847 163 @include icon(22px);
2f4c784a
C
164
165 position: relative;
54e78847 166 top: 5px;
2f4c784a
C
167 float: right;
168
169 margin: 0;
170 padding: 0;
931d3430 171 opacity: 0.5;
8319d6ae 172
931d3430 173 &[iconName=cross] { /* stylelint-disable-line selector-max-compound-selectors */
8319d6ae 174 @include icon(16px);
931d3430 175
8319d6ae
RK
176 top: -3px;
177 }
2f4c784a
C
178 }
179 }
180
181 .inputs {
182 margin-bottom: 0;
27bc9586 183 text-align: end;
2f4c784a 184
266947e5 185 > .peertube-button:not(:first-child) {
27bc9586 186 @include margin-left(10px);
2f4c784a
C
187 }
188 }
189}
190
8110705d 191
192// On desktop browsers, make the content and header horizontally sticked to right not move when modal open and close
193.modal-open {
194 overflow-y: scroll !important; // Make sure vertical scroll bar is always visible on desktop browsers to get disabled scrollbar effect
17384fd8 195 width: 100vw; // Make sure the content fits all the available width
8110705d 196}
197
245b9d27
K
198// On touchscreen devices, simply overflow: hidden to avoid detached overlay on scroll
199@media (hover: none) and (pointer: coarse) {
931d3430
C
200 .modal-open,
201 .menu-open {
245b9d27
K
202 overflow: hidden !important;
203 }
204
205 // On touchscreen devices display content overlay when opened menu
206 .menu-open {
207 .main-col {
208 &::before {
931d3430 209 background-color: #000;
245b9d27
K
210 width: 100vw;
211 height: 100vh;
212 opacity: 0.75;
213 content: '';
214 display: block;
215 position: fixed;
d6eace77 216 z-index: z('menu') - 1;
245b9d27
K
217 }
218 }
219 }
220}
221
2f4c784a
C
222// Nav customizations
223.nav .nav-link {
224 display: flex !important;
225 align-items: center;
226 height: 30px !important;
227 padding: 10px 15px !important;
228}
229
230.nav.nav-pills {
231 font-size: 16px !important;
ed5bb517 232 font-weight: $font-semibold !important;
2f4c784a 233
ed5bb517
K
234 .nav-link {
235 opacity: 0.6 !important;
236
931d3430
C
237 &.active,
238 &:hover,
239 &:active,
240 &:focus {
ed5bb517
K
241 opacity: 1 !important;
242 }
2f4c784a
C
243 }
244
245 a {
246 @include disable-default-a-behaviour;
247
e66883b3 248 color: pvar(--mainForegroundColor);
2f4c784a
C
249 }
250}
251
ed5bb517
K
252.nav-tabs .nav-link {
253 @include disable-default-a-behaviour;
2f4c784a 254
ed5bb517
K
255 color: pvar(--mainForegroundColor);
256 font-weight: $font-semibold;
931d3430 257 border: 0;
ed5bb517
K
258 border-bottom: 2px solid transparent;
259 opacity: 0.6;
2f4c784a 260
758f0d19 261 &.active {
ed5bb517 262 color: pvar(--mainForegroundColor);
e66883b3 263 background-color: pvar(--mainBackgroundColor) !important;
ed5bb517 264 border-bottom-color: pvar(--mainColor);
758f0d19 265 }
ed5bb517 266
931d3430
C
267 &.active,
268 &:hover,
269 &:active,
270 &:focus {
ed5bb517 271 opacity: 1;
758f0d19 272 }
2f4c784a
C
273}
274
a4610bc6 275.card {
e66883b3 276 background-color: pvar(--mainBackgroundColor);
a4610bc6
JM
277 border-color: #dee2e6;
278}
279
2f4c784a
C
280.collapse-transition {
281 // Animation when we show/hide the filters
282 transition: max-height 0.3s;
283 display: block !important;
284 overflow: hidden !important;
285 max-height: 0;
286
287 &.show {
288 max-height: 1500px;
289 }
290}
bc584963
RK
291
292.dropdown-divider {
293 margin: 0.3rem 0;
000eb0e4
RK
294}
295
296ngb-modal-backdrop {
36f2981f
RK
297 z-index: z(modal) - 1 !important;
298}
299
300ngb-modal-window {
301 z-index: z(modal) !important;
000eb0e4 302}
aa0f1963 303
757ffdfe
RK
304ngb-popover-window {
305 z-index: z(popover) !important;
306}
307
308ngb-tooltip-window {
309 z-index: z(tooltip) !important;
310}
311
947d0102
RK
312.btn-outline-secondary {
313 border-color: $input-border-color;
314
315 &:focus-within,
316 &:focus,
317 &:hover {
318 color: #fff;
319 background-color: #6c757d;
320 }
321}
322
aa0f1963 323.btn-outline-tertiary {
e66883b3
RK
324 color: pvar(--secondaryColor);
325 border-color: pvar(--secondaryColor);
a3705089 326
947d0102
RK
327 &:focus-within,
328 &:focus,
aa0f1963 329 &:hover {
e66883b3
RK
330 color: pvar(--mainBackgroundColor);
331 background-color: pvar(--secondaryColor);
aa0f1963
RK
332 }
333}
a6d5ff76
RK
334
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}