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