|
16 | 16 | * |
17 | 17 | */ |
18 | 18 |
|
19 | | -/* BASE STYLING ---------------------------------------------------------- */ |
| 19 | +/* BASE STYLING ------------------------------------------------------------ */ |
20 | 20 |
|
21 | 21 | h2 { |
22 | 22 | font-size: 20px; |
@@ -64,24 +64,18 @@ kbd { |
64 | 64 | } |
65 | 65 |
|
66 | 66 |
|
67 | | -/* APP STYLING -------------------------------------------------------------- */ |
| 67 | +/* APP STYLING ------------------------------------------------------------ */ |
68 | 68 |
|
69 | | -#app { |
70 | | - height: 100%; |
71 | | - width: 100%; |
72 | | - * { |
73 | | - box-sizing: border-box; |
74 | | - } |
| 69 | +#content[class*='app-'] * { |
| 70 | + box-sizing: border-box; |
75 | 71 | } |
76 | 72 |
|
77 | | -/* APP-NAVIGATION ------------------------------------------------------------*/ |
78 | | - |
| 73 | +/* APP-NAVIGATION ------------------------------------------------------------ */ |
79 | 74 | /* Navigation: folder like structure */ |
80 | | - |
81 | 75 | #app-navigation { |
82 | 76 | width: 250px; |
83 | 77 | /* header height */ |
84 | | - height: calc(100vh - 50px); |
| 78 | + height: calc(100vh - #{$header-height}); |
85 | 79 | position: fixed; |
86 | 80 | box-sizing: border-box; |
87 | 81 | background-color: var(--color-main-background); |
@@ -587,54 +581,100 @@ kbd { |
587 | 581 | } |
588 | 582 | } |
589 | 583 |
|
590 | | -/* APP-CONTENT ---------------------------------------------------------------*/ |
| 584 | + |
| 585 | +/* CONTENT --------------------------------------------------------- */ |
| 586 | +#content { |
| 587 | + /* header height */ |
| 588 | + padding-top: $header-height; |
| 589 | + box-sizing: border-box; |
| 590 | + position: relative; |
| 591 | + overflow-x: hidden; |
| 592 | + transition: margin-right 300ms ease-in-out; |
| 593 | + /* trick: scroll #app-content and not the body |
| 594 | + * to avoid double scrollbar with sidebar |
| 595 | + */ |
| 596 | + max-height: 100vh; |
| 597 | + &.with-app-sidebar { |
| 598 | + // to force the scrollbar to be visible |
| 599 | + // and not under the sidebar |
| 600 | + margin-right: 27vw; |
| 601 | + max-width: calc(100vw - #{$sidebar-width}); |
| 602 | + } |
| 603 | +} |
| 604 | + |
| 605 | +/* APP-CONTENT AND WRAPPER ------------------------------------------ */ |
591 | 606 | /* Part where the content will be loaded into */ |
592 | 607 | #app-content { |
593 | 608 | margin-left: 250px; |
594 | 609 | z-index: 1000; |
595 | 610 | background-color: var(--color-main-background); |
596 | 611 | position: relative; |
597 | | - min-height: calc(100vh - 50px); |
| 612 | + min-height: calc(100vh - #{$header-height}); |
598 | 613 | /* no top border for first settings item */ |
599 | 614 | > .section:first-child { |
600 | 615 | border-top: none; |
601 | 616 | } |
602 | | - &.with-app-sidebar { |
603 | | - margin-right: 27%; |
| 617 | + |
| 618 | + /* if app-content-list is present */ |
| 619 | + #app-content-wrapper { |
| 620 | + display: flex; |
| 621 | + position: relative; |
| 622 | + align-items: start; |
| 623 | + .app-content-list, |
| 624 | + .app-content-detail { |
| 625 | + min-height: calc(100vh - #{$header-height}); |
| 626 | + max-height: calc(100vh - #{$header-height}); |
| 627 | + overflow-x: hidden; |
| 628 | + overflow-y: auto; |
| 629 | + } |
| 630 | + |
| 631 | + /* CONTENT DETAILS AFTER LIST*/ |
| 632 | + .app-content-detail { |
| 633 | + /* grow full width */ |
| 634 | + flex-grow: 1; |
| 635 | + #app-navigation-toggle-back { |
| 636 | + display: none; |
| 637 | + } |
| 638 | + } |
604 | 639 | } |
605 | 640 | } |
606 | 641 |
|
607 | | -/* APP-SIDEBAR ----------------------------------------------------------------*/ |
608 | | - |
| 642 | +/* APP-SIDEBAR ------------------------------------------------------------ */ |
609 | 643 | /* |
610 | | - Sidebar: a sidebar to be used within #app-content |
611 | | - have it as first element within app-content in order to shrink other |
612 | | - sibling containers properly. Compare Files app for example. |
| 644 | + Sidebar: a sidebar to be used within #content |
| 645 | + #app-content will be shrinked properly |
613 | 646 | */ |
614 | 647 | #app-sidebar { |
615 | 648 | position: fixed; |
616 | | - top: 50px; |
617 | | - right: 0; |
| 649 | + top: $header-height; |
618 | 650 | left: auto; |
619 | 651 | bottom: 0; |
620 | | - width: 27%; |
621 | | - min-width: 300px; |
| 652 | + width: 27vw; |
| 653 | + min-width: $sidebar-width; |
622 | 654 | display: block; |
623 | 655 | background: var(--color-main-background); |
624 | 656 | border-left: 1px solid var(--color-border); |
625 | | - -webkit-transition: margin-right 300ms; |
626 | | - transition: margin-right 300ms; |
627 | 657 | overflow-x: hidden; |
628 | 658 | overflow-y: auto; |
629 | | - visibility: visible; |
630 | 659 | z-index: 500; |
| 660 | + animation: slideAndShow 300ms ease-in-out; |
| 661 | + animation-fill-mode: both; |
631 | 662 | &.disappear { |
632 | | - visibility: hidden; |
| 663 | + animation: slideAndHide 300ms ease-in-out; |
| 664 | + animation-fill-mode: both; |
633 | 665 | } |
634 | 666 | } |
| 667 | +@keyframes slideAndHide { |
| 668 | + 0% {right: 0;} |
| 669 | + 99% {right: -100%;} |
| 670 | + 100% {right: -100%; display: none;} |
| 671 | +} |
| 672 | +@keyframes slideAndShow { |
| 673 | + 0% {right: -100%;} |
| 674 | + 100% {right: 0;} |
| 675 | +} |
635 | 676 |
|
636 | | -/* APP-SETTINGS ---------------------------------------------------------------*/ |
637 | | - |
| 677 | +/* APP-SETTINGS ------------------------------------------------------------ */ |
638 | 678 | /* settings area */ |
639 | 679 | #app-settings { |
640 | 680 | // To the bottom w/ flex |
@@ -719,7 +759,7 @@ kbd { |
719 | 759 | } |
720 | 760 | } |
721 | 761 |
|
722 | | -/* GENERAL SECTION ---------------------------------------------------------- */ |
| 762 | +/* GENERAL SECTION ------------------------------------------------------------ */ |
723 | 763 | .section { |
724 | 764 | display: block; |
725 | 765 | padding: 30px; |
@@ -756,7 +796,7 @@ kbd { |
756 | 796 | } |
757 | 797 | } |
758 | 798 |
|
759 | | -/* TABS --------------------------------------------------------------------- */ |
| 799 | +/* TABS ------------------------------------------------------------ */ |
760 | 800 | .tabHeaders { |
761 | 801 | display: inline-block; |
762 | 802 | margin: 15px; |
@@ -789,7 +829,7 @@ kbd { |
789 | 829 | } |
790 | 830 | } |
791 | 831 |
|
792 | | -/* POPOVER MENU ------------------------------------------------------------- */ |
| 832 | +/* POPOVER MENU ------------------------------------------------------------ */ |
793 | 833 | $popoveritem-height: 38px; |
794 | 834 | $popovericon-size: 16px; |
795 | 835 |
|
@@ -1009,29 +1049,8 @@ $popovericon-size: 16px; |
1009 | 1049 |
|
1010 | 1050 | } |
1011 | 1051 | } |
1012 | | - |
1013 | | -/* CONTENT WRAPPER --------------------------------------------------------- */ |
1014 | | -#content { |
1015 | | - /* header height */ |
1016 | | - padding-top: 50px; |
1017 | | - box-sizing: border-box; |
1018 | | - position: relative; |
1019 | | -} |
1020 | | -/* if app-content-list is present */ |
1021 | | -#app-content-wrapper { |
1022 | | - display: flex; |
1023 | | - position: relative; |
1024 | | - align-items: start; |
1025 | | - .app-content-list, |
1026 | | - .app-content-detail { |
1027 | | - min-height: calc(100vh - 50px); |
1028 | | - max-height: calc(100vh - 50px); |
1029 | | - overflow-x: hidden; |
1030 | | - overflow-y: auto; |
1031 | | - } |
1032 | | -} |
1033 | 1052 |
|
1034 | | -/* CONTENT LIST ------------------------------------------------------------- */ |
| 1053 | +/* CONTENT LIST ------------------------------------------------------------ */ |
1035 | 1054 | .app-content-list { |
1036 | 1055 | width: 300px; |
1037 | 1056 | border-right: 1px solid var(--color-border); |
@@ -1184,13 +1203,3 @@ $popovericon-size: 16px; |
1184 | 1203 | } |
1185 | 1204 | } |
1186 | 1205 |
|
1187 | | -/* CONTENT ------------------------------------------------------------------ */ |
1188 | | -.app-content-detail { |
1189 | | - /* grow full width */ |
1190 | | - flex-grow: 1; |
1191 | | - |
1192 | | - #app-navigation-toggle-back { |
1193 | | - display: none; |
1194 | | - } |
1195 | | -} |
1196 | | - |
|
0 commit comments