##// END OF EJS Templates
Place changesets above history on small screens (#22196)....
Jean-Philippe Lang -
r14914:c5c5456d7268
parent child
Show More
@@ -1,782 +1,795
1 1 /*----------------------------------------*\
2 2 RESPONSIVE CSS
3 3 \*----------------------------------------*/
4 4
5 5 /*
6 6 CONTENTS
7 7
8 8 A) BASIC MOBILE RESETS
9 9 B) HEADER & TOP MENUS
10 10 C) MAIN CONTENT & SIDEBAR
11 11 D) TOGGLE BUTTON & FLYOUT MENU
12 12 E) UX ELEMENTS
13 13 F) PAGE SPECIFIC STYLES
14 14 G) FORMS
15 15 */
16 16
17 17 /* Hide new elements (toggle button and flyout menu) above 900px */
18 18 .mobile-toggle-button,
19 19 .flyout-menu {
20 20 display: none;
21 21 }
22 22
23 23 /*
24 24 redmine's body is set to min-width: 900px
25 25 add first breakpoint here and start adding responsiveness
26 26 */
27 27
28 28 @media all and (max-width: 899px)
29 29 {
30 30 /*----------------------------------------*\
31 31 A) BASIC MOBILE RESETS
32 32 \*----------------------------------------*/
33 33
34 34 /*
35 35 apply natural border box, see: http://www.paulirish.com/2012/box-sizing-border-box-ftw/
36 36 this helps us to better deal with percentages and padding / margin
37 37 */
38 38 *,
39 39 *:before,
40 40 *:after {
41 41 -webkit-box-sizing: border-box;
42 42 -moz-box-sizing: border-box;
43 43 box-sizing: border-box;
44 44 }
45 45
46 46 body,
47 47 html {
48 48 height: 100%;
49 49 margin: 0;
50 50 padding: 0;
51 51 }
52 52
53 53 html {
54 54 overflow-y: auto; /* avoid 2nd scrollbar on desktop */
55 55 -webkit-text-size-adjust: 100%; /* prevent font scaling in landscape mode on webkit */
56 56 }
57 57
58 58 body {
59 59 min-width: 0; /* reset the min-width of 900px */
60 60 -webkit-overflow-scrolling: touch;
61 61 }
62 62
63 63 body,
64 64 input,
65 65 select,
66 66 textarea,
67 67 button {
68 68 font-size: 14px; /* Set font-size for standard elements to 14px */
69 69 }
70 70
71 71 select {
72 72 max-width: 100%; /* prevent long names within select menues from breaking content */
73 73 }
74 74
75 75 #wrapper {
76 76 position: relative;
77 77 overflow-x: hidden; /* hide horizontal overflow */
78 78 max-width: 100%;
79 79 }
80 80
81 81 #wrapper,
82 82 #wrapper2 {
83 83 margin: 0;
84 84 }
85 85
86 86 /*----------------------------------------*\
87 87 B) HEADER & TOP MENUS
88 88 \*----------------------------------------*/
89 89
90 90 #header {
91 91 width: 100%;
92 92 height: 64px; /* the height of our header on mobile */
93 93 min-height: 0;
94 94 margin: 0;
95 95 padding: 0;
96 96 border: none;
97 97 background-color: #628db6;
98 98 position: fixed;
99 99 z-index: 9999;
100 100 }
101 101
102 102 /* Hide project name on mobile (project name is still visible in select menu) */
103 103 #header h1 {
104 104 display: none !important;
105 105 }
106 106
107 107 /* reset #header a color for mobile toggle button */
108 108 #header a.mobile-toggle-button {
109 109 color: #f8f8f8;
110 110 }
111 111
112 112
113 113 /* Hide top-menu and main-menu on mobile, because it's placed in our flyout menu */
114 114 #top-menu,
115 115 #header #main-menu {
116 116 display: none;
117 117 }
118 118
119 119 /* the quick search within header holding search form and #project_quick_jump_box box*/
120 120 #header #quick-search {
121 121 float: none;
122 122 clear: none; /* there are themes which set clear property, this resets it */
123 123 max-width: 100%; /* reset max-width */
124 124 margin: 0;
125 125 background: inherit;
126 126 }
127 127
128 128 /* this represents the dropdown arrow to left of the mobile project menu */
129 129 #header .jump-box-arrow:before {
130 130 /* set a font-size in order to achive same result in different themes */
131 131 font-family: Verdana, sans-serif;
132 132 font-size: 2em;
133 133 line-height: 64px;
134 134
135 135 position: absolute;
136 136 left: 0;
137 137
138 138 width: 2em;
139 139 padding: 0 .5em;
140 140 /* achieve dropdwon arrow by scaling a caret character */
141 141 content: '^';
142 142 -webkit-transform: scale(1,-.8);
143 143 -ms-transform: scale(1,-.8);
144 144 transform: scale(1,-.8);
145 145 text-align: right;
146 146 pointer-events: none;
147 147
148 148 opacity: .6;
149 149 }
150 150
151 151 /* styles for combobox within quick-search (#project_quick_jump_box) */
152 152 #header #quick-search select {
153 153 font-size: 1.5em;
154 154 font-weight: bold;
155 155 line-height: 1.2;
156 156
157 157 position: absolute;
158 158 top: 15px;
159 159 left: 0;
160 160
161 161 float: left;
162 162
163 163 width: 100%;
164 164 max-width: 100%;
165 165 height: 2em;
166 166 height: 35px;
167 167 padding: 5px;
168 168 padding-right: 72px;
169 169 padding-left: 50px;
170 170
171 171 text-indent: .01px;
172 172
173 173 color: inherit;
174 174 border: 0;
175 175 -webkit-border-radius: 0;
176 176 border-radius: 0;
177 177 background: none;
178 178 -webkit-box-shadow: none;
179 179 box-shadow: none;
180 180 /* hide default browser arrow */
181 181 -webkit-appearance: none;
182 182 -moz-appearance: none;
183 183 }
184 184
185 185 #header #quick-search form {
186 186 display: none;
187 187 }
188 188
189 189 /*----------------------------------------*\
190 190 C) MAIN CONTENT & SIDEBAR
191 191 \*----------------------------------------*/
192 192
193 193 #main {
194 194 padding: 64px 0 0; /* padding-top equals header height */
195 195 }
196 196
197 197 #main.nosidebar #content,
198 198 div#content {
199 199 width: 100%;
200 200 min-height: 0; /* reset min-height of #content */
201 201 margin: 0;
202 202 }
203 203
204 204 /* hide sidebar and sidebar switch panel, since it's placed in mobile flyout menu */
205 205 #sidebar,
206 206 #sidebar-switch-panel {
207 207 display: none;
208 208 }
209 209
210 210 .splitcontentleft {
211 211 width: 100%;
212 212 }
213 213
214 214 .splitcontentright {
215 215 width: 100%;
216 216 }
217 217
218 218 /*----------------------------------------*\
219 219 D) TOGGLE BUTTON & FLYOUT MENU
220 220 \*----------------------------------------*/
221 221
222 222 .mobile-toggle-button {
223 223 font-size: 42px;
224 224 line-height: 64px;
225 225
226 226 position: relative;
227 227 z-index: 10;
228 228
229 229 display: block; /* remove display: none; of non-mobile version */
230 230 float: right;
231 231
232 232 width: 60px;
233 233 height: 64px;
234 234 margin-top: 0;
235 235
236 236 text-align: center;
237 237
238 238 border-left: 1px solid #ddd;
239 239 }
240 240
241 241 .mobile-toggle-button:hover,
242 242 .mobile-toggle-button:active {
243 243 text-decoration: none;
244 244 }
245 245
246 246 .mobile-toggle-button:after {
247 247 font-family: Verdana, sans-serif;
248 248 display: block;
249 249 margin-top: -3px;
250 250 content: '\2261';
251 251 }
252 252
253 253 /* search magnifier icon */
254 254 .search-magnifier {
255 255 font-family: Verdana;
256 256 color: #bbb;
257 257
258 258 cursor: pointer;
259 259 -webkit-transform: rotate(-45deg);
260 260 -moz-transform: rotate(45deg);
261 261 -o-transform: rotate(45deg);
262 262 }
263 263
264 264 .search-magnifier--flyout {
265 265 font-size: 25px;
266 266 line-height: 54px;
267 267
268 268 position: absolute;
269 269 z-index: 1;
270 270 left: 12px;
271 271 }
272 272
273 273 /* Flyout Menu */
274 274
275 275 .flyout-menu {
276 276 position: absolute;
277 277 right: -250px;
278 278
279 279 display: block; /* remove display: none; of non-mobile version */
280 280 overflow-x: hidden;
281 281
282 282 width: 250px;
283 283 height: 100%;
284 284 margin: 0; /* reset margin for themes that define it */
285 285 padding: 0; /* reset padding for themes that define it */
286 286
287 287 color: white;
288 288 background-color: #3e5b76;
289 289 }
290 290
291 291 /* avoid zoom on search input focus for ios devices */
292 292 .flyout-menu input[type='text'] {
293 293 font-size: 16px;
294 294 }
295 295
296 296 .flyout-menu h3 {
297 297 font-size: 11px;
298 298 line-height: 19px;
299 299
300 300 height: 20px;
301 301 margin: 0;
302 302 padding: 0;
303 303
304 304 letter-spacing: .1em;
305 305 text-transform: uppercase;
306 306
307 307 color: white;
308 308 border-top: 1px solid #506a83;
309 309 border-bottom: 1px solid #506a83;
310 310 background-color: #628db6;
311 311 }
312 312
313 313 .flyout-menu h4 {
314 314 color: white;
315 315 }
316 316
317 317 .flyout-menu h3,
318 318 .flyout-menu h4,
319 319 .flyout-menu > p,
320 320 .flyout-menu > a,
321 321 .flyout-menu ul li a,
322 322 .flyout-menu__search,
323 323 .flyout-menu__sidebar > div,
324 324 .flyout-menu__sidebar > p,
325 325 .flyout-menu__sidebar > a,
326 326 .flyout-menu__sidebar > form,
327 327 .flyout-menu > div,
328 328 .flyout-menu > form {
329 329 padding-left: 8px;
330 330 }
331 331
332 332 .flyout-menu .flyout-menu__avatar {
333 333 margin-top: -1px; /* move avatar up 1px */
334 334 padding-left: 0;
335 335 }
336 336
337 337 .flyout-menu__sidebar > form {
338 338 display: block;
339 339 }
340 340
341 341 .flyout-menu__sidebar > form h3 {
342 342 margin-left: -8px;
343 343 }
344 344
345 345 .flyout-menu__sidebar > form label {
346 346 display: inline-block;
347 347 margin: 8px 0;
348 348 }
349 349
350 350 .flyout-menu__sidebar > form br br {
351 351 display: none;
352 352 }
353 353
354 354 /* Targets list containing checkboxes (e.g. activities sidebar) in flyout menu */
355 355 .flyout-menu__sidebar form > ul {
356 356 margin-left: -8px;
357 357 padding-left: 0;
358 358 }
359 359
360 360 .flyout-menu__sidebar form > ul li {
361 361 line-height: 39px;
362 362 display: block;
363 363 padding-left: 8px;
364 364 border-top: 1px solid rgba(255,255,255,.1);
365 365 }
366 366
367 367 .flyout-menu__sidebar form > ul li:first-child {
368 368 border-top: none;
369 369 }
370 370
371 371 .flyout-menu__sidebar form > ul li label {
372 372 margin: 0;
373 373 }
374 374
375 375 .flyout-menu__sidebar form > ul li label a {
376 376 line-height: 1;
377 377 display: inline;
378 378 padding-left: 0;
379 379 border: none;
380 380 }
381 381
382 382 .flyout-menu ul {
383 383 margin: 0;
384 384 padding: 0;
385 385 list-style: none;
386 386 }
387 387
388 388 .flyout-menu #watchers {
389 389 display: -webkit-flex;
390 390 display: -ms-flexbox;
391 391 display: -webkit-box;
392 392 display: flex;
393 393 flex-direction: column;
394 394
395 395 -webkit-flex-direction: column;
396 396 -ms-flex-direction: column;
397 397 -webkit-box-orient: vertical;
398 398 -webkit-box-direction: normal;
399 399 }
400 400
401 401 .flyout-menu #watchers .contextual {
402 402 -webkit-box-ordinal-group: 4;
403 403 -webkit-order: 3;
404 404 -ms-flex-order: 3;
405 405 order: 3;
406 406 }
407 407
408 408 .flyout-menu #watchers h3 {
409 409 margin-left: -8px;
410 410 }
411 411
412 412 .flyout-menu #watchers ul li {
413 413 display: -webkit-flex;
414 414 display: -ms-flexbox;
415 415 display: -webkit-box;
416 416 display: flex;
417 417 flex-direction: row;
418 418
419 419 -webkit-flex-direction: row;
420 420 -ms-flex-direction: row;
421 421 -webkit-box-orient: horizontal;
422 422 -webkit-box-direction: normal;
423 423 -webkit-align-items: center;
424 424 -ms-flex-align: center;
425 425 -webkit-box-align: center;
426 426 align-items: center;
427 427 }
428 428
429 429 .flyout-menu ul li a {
430 430 line-height: 40px;
431 431 display: block;
432 432 overflow: hidden;
433 433 height: 40px;
434 434 white-space: nowrap;
435 435 text-overflow: ellipsis;
436 436 border-top: 1px solid rgba(255,255,255,.1);
437 437 }
438 438
439 439 .flyout-menu ul li:first-child a {
440 440 line-height: 39px;
441 441 height: 39px;
442 442 border-top: none;
443 443 }
444 444
445 445 .flyout-menu a {
446 446 color: white;
447 447 }
448 448
449 449 .flyout-menu ul li a:hover {
450 450 text-decoration: none;
451 451 }
452 452
453 453 .flyout-menu ul li a.new-object,
454 454 .new-object ~ .menu-children {
455 455 display: none;
456 456 }
457 457
458 458 /* Left flyout search container */
459 459 .flyout-menu__search {
460 460 line-height: 54px;
461 461 height: 64px;
462 462 padding-top: 3px;
463 463 padding-right: 8px;
464 464 }
465 465
466 466 .flyout-menu__search input[type='text'] {
467 467 line-height: 2;
468 468
469 469 width: 100%;
470 470 height: 38px;
471 471 padding-left: 27px;
472 472
473 473 vertical-align: middle;
474 474
475 475 border: none;
476 476 -webkit-border-radius: 3px;
477 477 border-radius: 3px;
478 478 background-color: #fff;
479 479 }
480 480
481 481 .flyout-menu__avatar {
482 482 display: -webkit-box;
483 483 display: -webkit-flex;
484 484 display: -ms-flexbox;
485 485 display: flex;
486 486 width: 100%;
487 487 border-top: 1px solid rgba(255,255,255,.1);
488 488 }
489 489
490 490 .flyout-menu__avatar img.gravatar {
491 491 width: 40px;
492 492 height: 40px;
493 493 padding: 0;
494 494 vertical-align: top;
495 495 border-width: 0;
496 496 }
497 497
498 498 .flyout-menu__avatar a {
499 499 line-height: 40px;
500 500 height: auto;
501 501 height: 40px;
502 502 text-decoration: none;
503 503 color: white;
504 504 }
505 505
506 506 /* avatar */
507 507 .flyout-menu__avatar a:first-child {
508 508 line-height: 0;
509 509 width: 40px;
510 510 padding: 0;
511 511 }
512 512
513 513 .flyout-menu__avatar .user {
514 514 padding-left: 15px;
515 515 padding-right: 15px;
516 516 text-overflow: ellipsis;
517 517 overflow: hidden;
518 518 white-space: nowrap;
519 519 -webkit-flex-grow: 1;
520 520 -ms-flex-grow: 1;
521 521 flex-grow: 1;
522 522 }
523 523
524 524 /* user link when no avatar is present */
525 525 .flyout-menu__avatar--no-avatar a.user {
526 526 line-height: 40px;
527 527 padding-left: 8px;
528 528 }
529 529
530 530 .flyout-is-active body {
531 531 overflow: hidden; /* for body not to have scrollbars when left flyout menu is active */
532 532 }
533 533
534 534 html.flyout-is-active {
535 535 overflow: hidden;
536 536 }
537 537
538 538 .flyout-is-active #wrapper, .flyout-is-active #header {
539 539 right: 250px; /* when left flyout is active, move body and header to the right (same amount like flyout-menu's width) */
540 540 }
541 541
542 542 .flyout-is-active #wrapper {
543 543 overflow: visible;
544 544 height: 100%;
545 545 }
546 546
547 547 .flyout-is-active .mobile-toggle-button:after {
548 548 content: '\00D7'; /* close glyph */
549 549 }
550 550
551 551 .flyout-is-active #wrapper2 {
552 552 /*
553 553 * only relevant for devices with cursor when flyout it active, in order to show,
554 554 * that whole wrapper content is clickable and closes flyout menu
555 555 */
556 556 cursor: pointer;
557 557 }
558 558
559 559 #admin-menu {
560 560 padding-left: 0;
561 561 }
562 562
563 563 #admin-menu li {
564 564 padding-bottom: 0;
565 565 }
566 566
567 567 #admin-menu a,
568 568 #admin-menu a.selected {
569 569 line-height: 40px;
570 570 padding: 0;
571 571 padding-left: 32px !important;
572 572 background-position: 8px 50%;
573 573 }
574 574
575 575 /*----------------------------------------*\
576 576 E) UX ELEMENTS
577 577 \*----------------------------------------*/
578 578
579 579 .mobile-hide {display:none;}
580 580 .mobile-show {display:initial;}
581 581
582 582 /* Contextual Buttons */
583 583
584 584 #content>.contextual {
585 585 width: 100%;
586 586 margin-bottom: .5em;
587 587 padding-left: 0; /* reset left padding in order to use whole space */
588 588 white-space: normal;
589 589 color: transparent;
590 590 }
591 591
592 592 #content>.contextual a,
593 593 p.buttons a {
594 594 font-weight: bold;
595 595
596 596 display: inline-block;
597 597
598 598 margin: 5px 0;
599 599 margin-right: 2px;
600 600 padding: 9px 9px 9px 9px;
601 601
602 602 border: 1px solid #ddd;
603 603 -webkit-border-radius: 3px;
604 604 border-radius: 3px;
605 605 background-color: transparent;
606 606 background-position-x: 4px;
607 607 }
608 608
609 609 #content>.contextual a.icon,
610 610 p.buttons a.icon {
611 611 padding-left: 25px;
612 612 }
613 613
614 614 .flyout-menu .contextual {
615 615 float: none;
616 616 }
617 617
618 618 /* loading indicator */
619 619 #ajax-indicator {
620 620 width: 60%;
621 621 left: 20%;
622 622 }
623 623
624 624 /* jquery ui dialogs */
625 625 .ui-dialog {
626 626 max-width: 98%;
627 627 margin: 1%;
628 628 }
629 629
630 630 .ui-dialog .ui-dialog-content {
631 631 padding-left: 0;
632 632 padding-right: 0;
633 633 }
634 634
635 635 #filters-table {width:100%; float:none;}
636 636 .add-filter {width:100%; float:none; text-align: left; margin-top: 8px;}
637 637
638 638 /*----------------------------------------*\
639 639 F) PAGE SPECIFIC STYLES
640 640 \*----------------------------------------*/
641 641
642 642 /* page /login */
643 643
644 644 #login-form table {
645 645 width: 100%;
646 646 }
647 647
648 648 #login-form input#username,
649 649 #login-form input#password,
650 650 #login-form input#openid_url {
651 651 width: 100%;
652 652 height: auto;
653 653 }
654 654
655 655 /* some themes add a margin to login page, remove it on mobile */
656 656 .action-login #main {
657 657 margin: 0;
658 658 }
659 659
660 660 div#activity dl, #search-results {margin-left: 0;}
661 661
662 662 .version-overview table.progress {width:75%;}
663 663 div#version-summary {float:none; width:100%; margin-left:0;}
664 664 body.controller-versions.action-show div#roadmap .related-issues {width:100%;}
665 665
666 /* History and Changeset */
667 div#issue-changesets {
668 float: none;
669 width: auto;
670 margin-left: 0;
671 padding-left: 0;
672 margin-bottom: 2em;
673 }
674
675 div#issue-changesets div.changeset {
676 padding-top: 1em;
677 }
678
666 679 /*----------------------------------------*\
667 680 G) FORMS
668 681 \*----------------------------------------*/
669 682
670 683 input, select, textarea {
671 684 max-width: 100%;
672 685 }
673 686
674 687 /* tabular forms resets for mobile */
675 688 .tabular p, .tabular.settings p {
676 689 padding-left: 0;
677 690 }
678 691
679 692 .tabular label, .tabular.settings label {
680 693 display: block;
681 694 width: 100%;
682 695 margin-left: 0;
683 696 text-align: left;
684 697 }
685 698
686 699 .tabular input, .tabular select, .tabular textarea {
687 700 width: 100%;
688 701 max-width: 100%;
689 702 }
690 703
691 704 .tabular input[type="checkbox"], .tabular input.date {
692 705 width: auto;
693 706 max-width: 95%;
694 707 }
695 708
696 709 /* new issue form */
697 710 #all_attributes p:first-child {
698 711 float: none !important;
699 712 }
700 713
701 714 #issue_is_private_label {
702 715 display: inline;
703 716 }
704 717
705 718 span#watchers_inputs {
706 719 width: 100%;
707 720 }
708 721
709 722 /* subtasks and related issues list on issue show */
710 723 #issue_tree .issues, #relations .issues {
711 724 border-collapse: separate;
712 725 border-spacing: 0 1em; /* vertical space between tasks */
713 726 }
714 727
715 728 #issue_tree .issue > td:not(.checkbox), #relations .issue > td:not(.checkbox) {
716 729 display: block;
717 730 float: left;
718 731 text-align: left;
719 732 padding-right: 5px;
720 733 }
721 734
722 735 #issue_tree .issue > td, #relations .issue > td, #issue_tree .issue .user {
723 736 text-overflow: ellipsis; /* if text exceeds its space, add ... */
724 737 overflow: hidden;
725 738 }
726 739
727 740 #issue_tree .issue > td.subject, #relations .issue > td.subject {
728 741 width: 100% !important; /* let subject have one full width column */
729 742 }
730 743
731 744 #issue_tree .issue > td:not(.checkbox), #relations .issue > td:not(.checkbox) {
732 745 width: 33.33%; /* three columns for all cells that are not subject */
733 746 }
734 747
735 748 #relations .issues, #relations .issue {
736 749 position: relative; /* needed for .buttons positioning */
737 750 }
738 751
739 752 /* positioniong of unline button */
740 753 #relations .issue > td.buttons {
741 754 text-align: right;
742 755 position: absolute;
743 756 right: 0;
744 757 margin: 0;
745 758 padding-right: 0;
746 759 }
747 760
748 761 #relations .issue .buttons a {
749 762 vertical-align: middle;
750 763 padding-right: 5px;
751 764 }
752 765
753 766 #relations .issue > td.subject {
754 767 padding-right: 25px; /* this is the spaces that .buttons uses next to subject */
755 768 }
756 769
757 770 /* attachment upload form */
758 771 #attachments_fields span {
759 772 position: relative;
760 773 clear: both;
761 774 margin-bottom: 1em;
762 775 white-space: normal;
763 776 }
764 777 #attachments_fields span a.remove-upload {
765 778 position: absolute;
766 779 top: 0;
767 780 right: 0;
768 781 }
769 782
770 783 #attachments_fields input.description {
771 784 margin-left: 0;
772 785 width: 100%;
773 786 }
774 787 }
775 788
776 789 @media all and (max-width: 599px) {
777 790 .pagination ul.pages li {display:none;}
778 791 .pagination ul.pages li.current,
779 792 .pagination ul.pages li.previous,
780 793 .pagination ul.pages li.next {display:inline-block; width:32%; overflow:hidden;}
781 794 }
782 795
General Comments 0
You need to be logged in to leave comments. Login now