]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/application.scss
adjust registration form width on mobile (#3274)
[github/Chocobozzz/PeerTube.git] / client / src / sass / application.scss
CommitLineData
161b061d 1$icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
63c4db6d 2
9b8a7aa8 3@import '_bootstrap-variables';
dcbc29d5
C
4@import '_variables';
5@import '_mixins';
6
fa40cbc3 7@import '_fonts';
63c4db6d 8
d592e0a9 9@import '~video.js/dist/video-js.css';
c893d451 10
583eb04b 11$assets-path: '../../assets/';
b335ccec 12@import './player/index';
e31f6ad6 13
2f4c784a 14@import './bootstrap';
bbe0f064 15@import './primeng-custom';
02c01341 16@import './ng-select.scss';
bbe0f064 17
383bfc83
C
18[hidden] {
19 display: none !important;
20}
a64668c0 21
b33f657c 22body {
dcbc29d5 23 /*** theme ***/
4f926722 24 // now beware sass requires interpolation
dcbc29d5 25 // for css custom properties #{$var}
680b5496
RK
26 --mainColor: #{$main-color};
27 --mainColorLighter: #{$main-color-lighter};
a6d5ff76 28 --mainColorLightest: #{$main-color-lightest};
680b5496 29 --mainHoverColor: #{$main-hover-color};
dcbc29d5
C
30 --mainBackgroundColor: #{$bg-color};
31 --mainForegroundColor: #{$fg-color};
680b5496 32 --secondaryColor: #{$secondary-color};
2fcc2294 33
c123027f 34 --greyForegroundColor: #{$grey-foreground-color};
441e453a 35 --greyBackgroundColor: #{$grey-background-color};
c123027f 36
1d9d9cfd
RK
37 --menuBackgroundColor: #{$menu-background};
38 --menuForegroundColor: #{$menu-color};
dcbc29d5 39 --submenuColor: #{$sub-menu-color};
2fcc2294 40
3bf07dd8 41 --inputForegroundColor: #{$input-foreground-color};
14aa8556 42 --inputBackgroundColor: #{$input-background-color};
dcbc29d5
C
43 --inputPlaceholderColor: #{$input-placeholder-color};
44
3bf07dd8 45 --textareaForegroundColor: #{$textarea-foreground-color};
b15fe00f 46 --textareaBackgroundColor: #{$textarea-background-color};
f33dc6ab 47 --markdownTextareaBackgroundColor: #{$markdown-textarea-background-color};
b15fe00f 48
0240da5c
RK
49 --actionButtonColor: #{$grey-foreground-color};
50 --supportButtonBackgroundColor: #{transparent};
e66883b3 51 --supportButtonColor: #{pvar(--actionButtonColor)};
0240da5c 52 --supportButtonHeartColor: #{$support-button-heart};
2fcc2294 53
5f57df54
C
54 --activatedActionButtonColor: #{$activated-action-button-color};
55
e752c75e 56 --expanded-horizontal-margin-content: #{$expanded-horizontal-margins};
10846ef6 57
8a8e02a4 58 font-family: $main-fonts;
b33f657c 59 font-weight: $font-regular;
e66883b3
RK
60 color: pvar(--mainForegroundColor);
61 background-color: pvar(--mainBackgroundColor);
b34a444e 62 font-size: 14px;
8110705d 63 // On desktop browsers, make sure vertical scroll bar is always visible
64 // Allow to disable the scrollbar instead of hide it when the content fit the body
65 // And not move the content and header horizontally sticked to right when the content is updating
66 overflow-y: scroll;
b33f657c
C
67}
68
52cc0d54 69::selection {
e66883b3
RK
70 color: pvar(--mainBackgroundColor);
71 background-color: pvar(--mainHoverColor);
52cc0d54
RK
72}
73
73e09f27
C
74#incompatible-browser {
75 display: none;
76 text-align: center;
77 position: absolute;
78 width: 100%;
79 top: 45%;
80}
81
07fa4c97
C
82strong {
83 font-weight: $font-semibold;
84}
85
383bfc83
C
86input.readonly {
87 /* Force blank on readonly inputs */
e66883b3 88 background-color: pvar(--inputBackgroundColor) !important;
0ac5edd9 89}
90
63347a0f
C
91input, textarea {
92 outline: none;
e66883b3 93 color: pvar(--mainForegroundColor);
63347a0f
C
94}
95
adcf9212
CC
96button {
97 background: unset;
98 @include disable-outline;
99}
100
d235f6b0
C
101label {
102 font-weight: $font-bold;
103 font-size: 15px;
09223546
C
104}
105
fd9c3c8d 106code {
107 background-color: pvar(--greyBackgroundColor);
108 border-radius: 3px;
109 padding: .2em .4em;
110 margin: auto .4em;
111 font-size: 75%;
112 display: inline-block;
113 vertical-align: middle;
114}
115
a2b817d3
C
116.form-error {
117 display: block;
41a676db 118 color: $red;
a2b817d3
C
119 margin-top: 5px;
120}
121
122.input-error {
41a676db 123 border-color: $red !important;
a2b817d3
C
124}
125
2d9fea16
RK
126.fullWidth {
127 width: 100%;
128 margin-left: auto;
129 margin-right: auto;
130 max-width: initial;
131}
132
383bfc83
C
133.glyphicon-black {
134 color: black;
135}
136
c4741804 137.row {
947d0102 138 margin: 0 !important;
c4741804
RK
139}
140
383bfc83 141.main-col {
c30745f3 142 margin-left: $menu-width;
c4741804 143 width: calc(100% - #{$menu-width});
a6d5ff76 144 outline: none;
9bf9d2a5 145
c30745f3 146 .margin-content {
d178b5c1
C
147 margin-left: $not-expanded-horizontal-margins;
148 margin-right: $not-expanded-horizontal-margins;
b34a444e 149 flex-grow: 1;
c30745f3
C
150 }
151
152 .sub-menu {
e66883b3 153 background-color: pvar(--submenuColor);
c30745f3 154 width: 100%;
c30745f3
C
155 display: flex;
156 align-items: center;
d178b5c1 157 padding-left: $not-expanded-horizontal-margins;
22a16e36 158 padding-right: $not-expanded-horizontal-margins;
7034b3c9 159 height: $sub-menu-height;
160 margin-bottom: $sub-menu-margin-bottom;
ae2dd046
C
161
162 &.sub-menu-fixed {
ae2dd046 163 position: fixed;
d6eace77 164 z-index: #{z('sub-menu') - 1};
a949f676 165 }
c30745f3
C
166 }
167
7034b3c9 168 // Use an appropriate offset top when sub-menu fixed
169 .margin-content.offset-content {
170 padding-top: $sub-menu-height + $sub-menu-margin-bottom;
171 }
172
c30745f3
C
173 // Override some properties if the main content is expanded (no menu on the left)
174 &.expanded {
175 margin-left: 0;
c4741804 176 width: 100%;
c30745f3
C
177
178 .margin-content {
10846ef6
C
179 margin-left: var(--expanded-horizontal-margin-content);
180 margin-right: var(--expanded-horizontal-margin-content);
c30745f3
C
181 }
182
183 .sub-menu {
10846ef6
C
184 padding-left: var(--expanded-horizontal-margin-content);
185 padding-right: var(--expanded-horizontal-margin-content);
c30745f3 186 }
602eb142 187 }
b15fe00f
K
188
189 &.lock-scroll .main-row > router-outlet + * {
190 // Lock and hide body scrollbars
191 position: fixed;
192
193 // Lock and hide sub-menu scrollbars
194 .sub-menu {
195 overflow-x: hidden;
196 }
197 }
383bfc83 198}
602eb142 199
59aa1e5e 200.title-page {
ed5bb517 201 opacity: 0.6;
e66883b3 202 color: pvar(--mainForegroundColor);
59aa1e5e
C
203 font-size: 16px;
204 display: inline-block;
205 margin-right: 55px;
206 font-weight: $font-semibold;
207 @include disable-default-a-behaviour;
208
ed5bb517
K
209 border-bottom: 2px solid transparent;
210
211 &.title-page-single {
59aa1e5e
C
212 margin-top: 30px;
213 margin-bottom: 25px;
214 }
cadb46d8 215
d6ed9ccc 216 &.active {
ed5bb517 217 border-bottom-color: pvar(--mainColor);
d6ed9ccc
RK
218 }
219
220 &.title-page-single {
221 font-size: 125%;
222 }
223
cadb46d8 224 &:hover, &:active, &:focus {
e66883b3 225 color: pvar(--mainForegroundColor);
04e0fc48 226 }
1952a538 227
ed5bb517
K
228 &.active, &:hover, &:active, &:focus, &.title-page-single {
229 opacity: 1;
230 outline: 0px hidden !important;
231 }
232
ece3029b 233 @media screen and (max-width: $mobile-view) {
2c3abc4f 234 margin-right: 15px;
1952a538 235 }
cadb46d8 236}
04e0fc48 237
482fa503
RK
238.title-page-about,
239.title-page-settings {
e61151b0 240 white-space: nowrap;
482fa503 241 font-size: 115%;
482fa503
RK
242}
243
cd83ea1b
C
244.admin-sub-header {
245 display: flex;
246 align-items: center;
247 margin-bottom: 30px;
248
08c1efbe 249 .form-sub-title {
cd83ea1b
C
250 flex-grow: 1;
251 }
65b247dd
C
252
253 .admin-sub-nav a {
254 @include disable-default-a-behaviour;
255
256 font-size: 16px;
e66883b3 257 color: pvar(--mainForegroundColor);
65b247dd
C
258 padding: 5px 15px;
259 border-radius: 0.25rem;
ed5bb517
K
260 font-weight: $font-semibold;
261 opacity: 0.6;
65b247dd
C
262
263 &.active {
65b247dd 264 background-color: #f0f0f0;
ed5bb517
K
265 }
266
267 &.active, &:hover, &:active, &:focus {
268 opacity: 1;
65b247dd
C
269 }
270 }
cd83ea1b
C
271}
272
08c1efbe 273.form-sub-title {
04e0fc48
C
274 font-size: 20px;
275 font-weight: bold;
59aa1e5e
C
276}
277
315cc0cc
C
278@keyframes spin {
279 from { transform: scale(1) rotate(0deg);}
280 to { transform: scale(1) rotate(360deg);}
281}
282
fb4fd623
C
283// In tables, don't have a hover different background
284table {
285 .action-button-edit, .action-button-delete {
286 &:hover, &:active, &:focus, &[disabled], &.disabled {
457bb213 287 background-color: $grey-background-color !important;
fb4fd623
C
288 }
289 }
290}
291
2d3741d6
C
292.no-results {
293 height: 40vh;
22839330
RK
294 max-height: 500px;
295
2d3741d6 296 display: flex;
82f443de 297 flex-direction: column;
2d3741d6
C
298 align-items: center;
299 justify-content: center;
300 font-size: 16px;
301 font-weight: $font-semibold;
302}
303
eb7c7a51
RK
304.dropdown-item {
305 @include dropdown-with-icon-item;
306
307 my-global-icon {
308 width: 22px;
309 height: 22px;
310 }
311}
312
7034b3c9 313/* offsetTop for scrollToAnchor */
314
45e0d669
RK
315.anchor {
316 position: relative;
7034b3c9 317 top: #{-($header-height + 20px)};
318}
319
320.offset-content { // if sub-menu fixed
321 .anchor {
322 top: #{-($header-height + $sub-menu-height + 20px)};
323 }
45e0d669
RK
324}
325
c29039e7
C
326.form-group-description {
327 @extend .text-muted;
328
329 font-size: 90%;
330 margin-top: 10px;
331}
332
4872e946
C
333ngx-loading-bar {
334 z-index: z(header) + 1 !important;
335}
336
165ee292 337@media screen and (max-width: #{breakpoint(xxl)}) {
2303a803
RK
338 .main-col {
339 &.expanded {
340 .margin-content {
e752c75e 341 --expanded-horizontal-margin-content: #{$expanded-horizontal-margins/2};
2303a803
RK
342 }
343 }
344 }
345}
346
165ee292 347@media screen and (max-width: #{breakpoint(lg)}) {
1def3c52 348 /* the following applies from 500px to 900px and is partially overriden from 500px to 800px by changes below to $small-view */
1f788f20 349 .main-col {
1def3c52
RK
350 &, &.expanded {
351 .margin-content {
e752c75e 352 --expanded-horizontal-margin-content: #{$expanded-horizontal-margins/3};
1def3c52 353 }
dd778941 354
1def3c52
RK
355 .sub-menu {
356 padding-left: 50px;
357 padding-right: 50px;
22a16e36 358
1def3c52
RK
359 .title-page {
360 font-size: 17px;
361 }
dd778941 362 }
1f788f20
C
363 }
364 }
365}
366
1f6d2449 367@media screen and (min-width: $mobile-view) and (max-width: $small-view) {
ac6ac4e2 368 .main-col {
369 width: 100%;
370 }
371}
372
8ff3f883 373@media screen and (max-width: $small-view) {
20206dfb
C
374 .main-col {
375 margin-left: 0;
376
377 &, &.expanded {
378 .margin-content {
10846ef6 379 --expanded-horizontal-margin-content: 15px;
20206dfb
C
380 }
381
382 .sub-menu {
2c3abc4f 383 width: 100vw;
dd778941 384 padding-left: 15px;
22a16e36 385 padding-right: 15px;
4682468d 386 margin-bottom: $sub-menu-margin-bottom-small-view;
8544d8f5 387 overflow-x: auto;
20206dfb
C
388 }
389
7034b3c9 390 // Use an appropriate offset top when sub-menu fixed
391 .margin-content.offset-content {
392 padding-top: $sub-menu-height + $sub-menu-margin-bottom-small-view;
393 }
394
7a03209d
K
395 .admin-sub-header {
396 @include admin-sub-header-responsive(15px*2);
397 }
398
b15fe00f
K
399 my-markdown-textarea {
400 .root {
401 max-width: 100% !important;
402 }
403 }
404
4682468d
K
405 input[type=text],
406 input[type=password],
407 input[type=email],
c285180a 408 textarea,
409 .peertube-select-container {
225a7682 410 flex-grow: 1;
20206dfb 411 }
25a42e29
RK
412
413 .caption input[type=text] {
414 width: unset !important;
415 flex-grow: 1;
416 }
20206dfb
C
417 }
418 }
457bb213 419}
7a03209d 420
165ee292 421// overflow-databale responsive rules
c2a89b70 422@media screen and (min-width: #{breakpoint(lg)}) {
165ee292
K
423 .main-col {
424 &.expanded {
c2a89b70 425 @include overflow-datatable(breakpoint(lg), $expanded-horizontal-margins/2, $mobile-paginator: false);
165ee292
K
426 }
427
428 &:not(.expanded) {
c2a89b70 429 @include overflow-datatable(breakpoint(lg), $not-expanded-horizontal-margins + $menu-width/2, $mobile-paginator: false);
165ee292
K
430 }
431 }
432}
433
434@media screen and (max-width: #{breakpoint(lg)}) {
435 .main-col {
436 &.expanded {
437 @include overflow-datatable(breakpoint(lg), $expanded-horizontal-margins/3);
438 }
439
440 &:not(.expanded) {
c2a89b70 441 @include overflow-datatable(breakpoint(lg), $expanded-horizontal-margins/3 + $menu-width/2);
165ee292
K
442 }
443 }
444}
445
446@media screen and (max-width: $small-view) {
447 .main-col {
448 &:not(.expanded),
449 &.expanded {
450 @include overflow-datatable(breakpoint(lg), 15px);
451 }
452 }
453}
454
7a03209d
K
455@media screen and (min-width: $small-view) and (max-width: #{$small-view + $menu-width}) {
456 .main-col {
457 &:not(.expanded) {
458 .admin-sub-header {
c2a89b70 459 @include admin-sub-header-responsive($expanded-horizontal-margins/3 + $menu-width/2);
7a03209d 460 }
8544d8f5
K
461
462 .sub-menu {
463 overflow-x: auto;
464 width: calc(100vw - #{$menu-width});
465 }
7a03209d
K
466 }
467 }
468}