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