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