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