|
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); |
@@ -581,54 +575,100 @@ kbd { |
581 | 575 | } |
582 | 576 | } |
583 | 577 |
|
584 | | -/* APP-CONTENT ---------------------------------------------------------------*/ |
| 578 | + |
| 579 | +/* CONTENT --------------------------------------------------------- */ |
| 580 | +#content { |
| 581 | + /* header height */ |
| 582 | + padding-top: $header-height; |
| 583 | + box-sizing: border-box; |
| 584 | + position: relative; |
| 585 | + overflow-x: hidden; |
| 586 | + transition: margin-right 300ms ease-in-out; |
| 587 | + /* trick: scroll #app-content and not the body |
| 588 | + * to avoid double scrollbar with sidebar |
| 589 | + */ |
| 590 | + max-height: 100vh; |
| 591 | + &.with-app-sidebar { |
| 592 | + // to force the scrollbar to be visible |
| 593 | + // and not under the sidebar |
| 594 | + margin-right: 27vw; |
| 595 | + max-width: calc(100vw - #{$sidebar-width}); |
| 596 | + } |
| 597 | +} |
| 598 | + |
| 599 | +/* APP-CONTENT AND WRAPPER ------------------------------------------ */ |
585 | 600 | /* Part where the content will be loaded into */ |
586 | 601 | #app-content { |
587 | 602 | margin-left: 250px; |
588 | 603 | z-index: 1000; |
589 | 604 | background-color: var(--color-main-background); |
590 | 605 | position: relative; |
591 | | - min-height: calc(100vh - 50px); |
| 606 | + min-height: calc(100vh - #{$header-height}); |
592 | 607 | /* no top border for first settings item */ |
593 | 608 | > .section:first-child { |
594 | 609 | border-top: none; |
595 | 610 | } |
596 | | - &.with-app-sidebar { |
597 | | - margin-right: 27%; |
| 611 | + |
| 612 | + /* if app-content-list is present */ |
| 613 | + #app-content-wrapper { |
| 614 | + display: flex; |
| 615 | + position: relative; |
| 616 | + align-items: start; |
| 617 | + .app-content-list, |
| 618 | + .app-content-detail { |
| 619 | + min-height: calc(100vh - #{$header-height}); |
| 620 | + max-height: calc(100vh - #{$header-height}); |
| 621 | + overflow-x: hidden; |
| 622 | + overflow-y: auto; |
| 623 | + } |
| 624 | + |
| 625 | + /* CONTENT DETAILS AFTER LIST*/ |
| 626 | + .app-content-detail { |
| 627 | + /* grow full width */ |
| 628 | + flex-grow: 1; |
| 629 | + #app-navigation-toggle-back { |
| 630 | + display: none; |
| 631 | + } |
| 632 | + } |
598 | 633 | } |
599 | 634 | } |
600 | 635 |
|
601 | | -/* APP-SIDEBAR ----------------------------------------------------------------*/ |
602 | | - |
| 636 | +/* APP-SIDEBAR ------------------------------------------------------------ */ |
603 | 637 | /* |
604 | | - Sidebar: a sidebar to be used within #app-content |
605 | | - have it as first element within app-content in order to shrink other |
606 | | - sibling containers properly. Compare Files app for example. |
| 638 | + Sidebar: a sidebar to be used within #content |
| 639 | + #app-content will be shrinked properly |
607 | 640 | */ |
608 | 641 | #app-sidebar { |
609 | 642 | position: fixed; |
610 | | - top: 50px; |
611 | | - right: 0; |
| 643 | + top: $header-height; |
612 | 644 | left: auto; |
613 | 645 | bottom: 0; |
614 | | - width: 27%; |
615 | | - min-width: 300px; |
| 646 | + width: 27vw; |
| 647 | + min-width: $sidebar-width; |
616 | 648 | display: block; |
617 | 649 | background: var(--color-main-background); |
618 | 650 | border-left: 1px solid var(--color-border); |
619 | | - -webkit-transition: margin-right 300ms; |
620 | | - transition: margin-right 300ms; |
621 | 651 | overflow-x: hidden; |
622 | 652 | overflow-y: auto; |
623 | | - visibility: visible; |
624 | 653 | z-index: 500; |
| 654 | + animation: slideAndShow 300ms ease-in-out; |
| 655 | + animation-fill-mode: both; |
625 | 656 | &.disappear { |
626 | | - visibility: hidden; |
| 657 | + animation: slideAndHide 300ms ease-in-out; |
| 658 | + animation-fill-mode: both; |
627 | 659 | } |
628 | 660 | } |
| 661 | +@keyframes slideAndHide { |
| 662 | + 0% {right: 0;} |
| 663 | + 99% {right: -100%;} |
| 664 | + 100% {right: -100%; display: none;} |
| 665 | +} |
| 666 | +@keyframes slideAndShow { |
| 667 | + 0% {right: -100%;} |
| 668 | + 100% {right: 0;} |
| 669 | +} |
629 | 670 |
|
630 | | -/* APP-SETTINGS ---------------------------------------------------------------*/ |
631 | | - |
| 671 | +/* APP-SETTINGS ------------------------------------------------------------ */ |
632 | 672 | /* settings area */ |
633 | 673 | #app-settings { |
634 | 674 | // To the bottom w/ flex |
@@ -714,7 +754,7 @@ kbd { |
714 | 754 | } |
715 | 755 | } |
716 | 756 |
|
717 | | -/* GENERAL SECTION ---------------------------------------------------------- */ |
| 757 | +/* GENERAL SECTION ------------------------------------------------------------ */ |
718 | 758 | .section { |
719 | 759 | display: block; |
720 | 760 | padding: 30px; |
@@ -751,7 +791,7 @@ kbd { |
751 | 791 | } |
752 | 792 | } |
753 | 793 |
|
754 | | -/* TABS --------------------------------------------------------------------- */ |
| 794 | +/* TABS ------------------------------------------------------------ */ |
755 | 795 | .tabHeaders { |
756 | 796 | display: inline-block; |
757 | 797 | margin: 15px; |
@@ -784,7 +824,7 @@ kbd { |
784 | 824 | } |
785 | 825 | } |
786 | 826 |
|
787 | | -/* POPOVER MENU ------------------------------------------------------------- */ |
| 827 | +/* POPOVER MENU ------------------------------------------------------------ */ |
788 | 828 | $popoveritem-height: 38px; |
789 | 829 | $popovericon-size: 16px; |
790 | 830 |
|
@@ -1004,29 +1044,8 @@ $popovericon-size: 16px; |
1004 | 1044 |
|
1005 | 1045 | } |
1006 | 1046 | } |
1007 | | - |
1008 | | -/* CONTENT WRAPPER --------------------------------------------------------- */ |
1009 | | -#content { |
1010 | | - /* header height */ |
1011 | | - padding-top: 50px; |
1012 | | - box-sizing: border-box; |
1013 | | - position: relative; |
1014 | | -} |
1015 | | -/* if app-content-list is present */ |
1016 | | -#app-content-wrapper { |
1017 | | - display: flex; |
1018 | | - position: relative; |
1019 | | - align-items: start; |
1020 | | - .app-content-list, |
1021 | | - .app-content-detail { |
1022 | | - min-height: calc(100vh - 50px); |
1023 | | - max-height: calc(100vh - 50px); |
1024 | | - overflow-x: hidden; |
1025 | | - overflow-y: auto; |
1026 | | - } |
1027 | | -} |
1028 | 1047 |
|
1029 | | -/* CONTENT LIST ------------------------------------------------------------- */ |
| 1048 | +/* CONTENT LIST ------------------------------------------------------------ */ |
1030 | 1049 | .app-content-list { |
1031 | 1050 | width: 300px; |
1032 | 1051 | border-right: 1px solid var(--color-border); |
@@ -1179,13 +1198,3 @@ $popovericon-size: 16px; |
1179 | 1198 | } |
1180 | 1199 | } |
1181 | 1200 |
|
1182 | | -/* CONTENT ------------------------------------------------------------------ */ |
1183 | | -.app-content-detail { |
1184 | | - /* grow full width */ |
1185 | | - flex-grow: 1; |
1186 | | - |
1187 | | - #app-navigation-toggle-back { |
1188 | | - display: none; |
1189 | | - } |
1190 | | -} |
1191 | | - |
|
0 commit comments