]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/bootstrap.scss
Add ability to filter menu links
[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 {
931d3430 9 animation: spin 0.7s infinite linear;
2f4c784a
C
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 }
931d3430 28
a3705089
C
29 to {
30 transform: scale(1) rotate(360deg);
31 }
2f4c784a
C
32}
33
757ffdfe 34/* rules for dropdowns excepts when in button group, to avoid impacting the dropdown-toggle */
2856af48 35.dropdown {
f8cce49c 36 z-index: z(dropdown) !important;
2856af48 37}
26ede95e 38
2856af48
C
39.list-overflow-menu,
40.parent-entry {
41 z-index: z(header) - 1 !important;
eb7c7a51
RK
42}
43
2856af48
C
44.btn-group,
45.dropdown-root,
46.action-dropdown,
47.input-group-prepend,
48.column-toggle {
49 z-index: inherit !important;
50}
51
d4132d3f
RK
52.btn-group > .btn:not(:first-child) {
53 border-top-left-radius: 0 !important;
54 border-bottom-left-radius: 0 !important;
55}
56
2f4c784a 57.dropdown-menu {
e0433a5f
C
58 z-index: z(dropdown) + 1 !important;
59
2f4c784a 60 border-radius: 3px;
6f6e89db 61 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
62 font-size: 15px;
63
0d3a2982
RK
64 .dropdown-header {
65 padding-left: 1rem;
66 }
67
2f4c784a
C
68 .dropdown-item {
69 padding: 3px 15px;
70
24e7916c 71 &.active {
e66883b3
RK
72 color: pvar(--mainBackgroundColor) !important;
73 background-color: pvar(--mainHoverColor);
931d3430 74 opacity: 0.9;
2f4c784a 75 }
45c6bcf3 76
0aa52e17
C
77 &:active {
78 color: pvar(--mainForegroundColor) !important;
79 }
80
d3217560
RK
81 &::after {
82 display: none;
83 }
2f4c784a
C
84 }
85
86 button {
87 @include disable-default-a-behaviour;
88 }
89
90 a {
91 @include disable-default-a-behaviour;
92 color: #000 !important;
93 }
94}
95
26171379
C
96.badge {
97 line-height: 1.1;
98}
3921166d 99
165ee292 100@media screen and (min-width: #{breakpoint(md)}) {
931d3430 101 .modal::before {
3921166d 102 vertical-align: middle;
931d3430 103 content: ' ';
3921166d
RK
104 height: 100%;
105 }
106
107 .modal-dialog {
3921166d 108 text-align: left;
2bc9bd08
RK
109
110 &:not(.modal-lg):not(.modal-xl) {
111 min-width: 500px;
112 width: 40vw;
113 max-width: 900px;
114 }
3921166d
RK
115 }
116}
117
2f4c784a 118.modal {
3921166d
RK
119 text-align: center;
120
2f4c784a 121 .modal-content {
e66883b3 122 background-color: pvar(--mainBackgroundColor);
681276a6 123 word-break: break-word;
2f4c784a
C
124 }
125
126 .modal-header {
931d3430 127 border-bottom: 0;
2f4c784a
C
128 margin-bottom: 5px;
129
130 .modal-title {
131 font-size: 20px;
132 font-weight: $font-semibold;
133 }
134
135 my-global-icon {
54e78847 136 @include icon(22px);
2f4c784a
C
137
138 position: relative;
54e78847 139 top: 5px;
2f4c784a
C
140 float: right;
141
142 margin: 0;
143 padding: 0;
931d3430 144 opacity: 0.5;
8319d6ae 145
931d3430 146 &[iconName=cross] { /* stylelint-disable-line selector-max-compound-selectors */
8319d6ae 147 @include icon(16px);
931d3430 148
8319d6ae
RK
149 top: -3px;
150 }
2f4c784a
C
151 }
152 }
153
154 .inputs {
155 margin-bottom: 0;
156 text-align: right;
157
266947e5 158 > .peertube-button:not(:first-child) {
931d3430 159 margin-left: 10px;
2f4c784a
C
160 }
161 }
162}
163
8110705d 164
165// On desktop browsers, make the content and header horizontally sticked to right not move when modal open and close
166.modal-open {
167 overflow-y: scroll !important; // Make sure vertical scroll bar is always visible on desktop browsers to get disabled scrollbar effect
17384fd8 168 width: 100vw; // Make sure the content fits all the available width
8110705d 169}
170
245b9d27
K
171// On touchscreen devices, simply overflow: hidden to avoid detached overlay on scroll
172@media (hover: none) and (pointer: coarse) {
931d3430
C
173 .modal-open,
174 .menu-open {
245b9d27
K
175 overflow: hidden !important;
176 }
177
178 // On touchscreen devices display content overlay when opened menu
179 .menu-open {
180 .main-col {
181 &::before {
931d3430 182 background-color: #000;
245b9d27
K
183 width: 100vw;
184 height: 100vh;
185 opacity: 0.75;
186 content: '';
187 display: block;
188 position: fixed;
d6eace77 189 z-index: z('menu') - 1;
245b9d27
K
190 }
191 }
192 }
193}
194
2f4c784a
C
195// Nav customizations
196.nav .nav-link {
197 display: flex !important;
198 align-items: center;
199 height: 30px !important;
200 padding: 10px 15px !important;
201}
202
203.nav.nav-pills {
204 font-size: 16px !important;
ed5bb517 205 font-weight: $font-semibold !important;
2f4c784a 206
ed5bb517
K
207 .nav-link {
208 opacity: 0.6 !important;
209
931d3430
C
210 &.active,
211 &:hover,
212 &:active,
213 &:focus {
ed5bb517
K
214 opacity: 1 !important;
215 }
2f4c784a
C
216 }
217
218 a {
219 @include disable-default-a-behaviour;
220
e66883b3 221 color: pvar(--mainForegroundColor);
2f4c784a
C
222 }
223}
224
ed5bb517
K
225.nav-tabs .nav-link {
226 @include disable-default-a-behaviour;
2f4c784a 227
ed5bb517
K
228 color: pvar(--mainForegroundColor);
229 font-weight: $font-semibold;
931d3430 230 border: 0;
ed5bb517
K
231 border-bottom: 2px solid transparent;
232 opacity: 0.6;
2f4c784a 233
758f0d19 234 &.active {
ed5bb517 235 color: pvar(--mainForegroundColor);
e66883b3 236 background-color: pvar(--mainBackgroundColor) !important;
ed5bb517 237 border-bottom-color: pvar(--mainColor);
758f0d19 238 }
ed5bb517 239
931d3430
C
240 &.active,
241 &:hover,
242 &:active,
243 &:focus {
ed5bb517 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 325.input-group {
931d3430 326 > .form-control {
0d3a2982
RK
327 flex: initial;
328 }
931d3430 329
25a42e29
RK
330 input.form-control {
331 width: unset !important;
332 flex-grow: 1;
0d3a2982
RK
333 }
334
335 .input-group-prepend + input {
336 border-top-left-radius: 0 !important;
337 border-bottom-left-radius: 0 !important;
338 }
947d0102 339}
25a42e29
RK
340
341.has-feedback.has-clear {
342 position: relative;
343
344 input {
345 padding-right: 1.5rem !important;
346 }
347
348 .form-control-clear {
349 color: rgba(0, 0, 0, 0.4);
350 /*
351 * Enable pointer events as they have been disabled since Bootstrap 3.3
352 * See https://github.com/twbs/bootstrap/pull/14104
353 */
354 pointer-events: all;
355 display: flex;
356 justify-content: center;
357 align-items: center;
358 position: absolute;
359 right: .5rem;
360 height: 95%;
4f5d0459 361 font-size: 14px;
25a42e29
RK
362
363 &:hover {
364 color: rgba(0, 0, 0, 0.7);
365 cursor: pointer;
366 }
367 }
368
369 input:placeholder-shown + .form-control-clear {
370 display: none;
371 }
372}
ea5cdc11
RK
373
374.callout {
728a1236
RK
375 padding: 1.25rem;
376 border: 1px solid #eee;
ea5cdc11
RK
377 border-radius: .25rem;
378
931d3430 379 > label {
ea5cdc11
RK
380 position: relative;
381 top: -5px;
382 left: -10px;
383 color: #6c757d !important;
384 }
385
386 &:not(.callout-light) {
387 border-left-width: .25rem;
388 }
26171379 389
ea5cdc11
RK
390 &.callout-info {
391 border-color: pvar(--mainColorLightest);
392 border-left-color: pvar(--mainColor);
393 }
394}