diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-07-12 18:25:53 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-07-20 23:38:04 +0200 |
commit | e27e430f1fa756c0425b34611dfa16867ba97029 (patch) | |
tree | a0ee2b2bdc5ee9b8dec925586664a41059955185 | |
parent | 562e2aa30bd1c0b1766be01b2cd5de7b8f753008 (diff) | |
download | nextcloud-server-e27e430f1fa756c0425b34611dfa16867ba97029.tar.gz nextcloud-server-e27e430f1fa756c0425b34611dfa16867ba97029.zip |
use flex for main content
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
-rw-r--r-- | apps/files/css/files.scss | 4 | ||||
-rw-r--r-- | core/css/apps.scss | 42 | ||||
-rw-r--r-- | core/css/mobile.scss | 2 | ||||
-rw-r--r-- | core/css/variables.scss | 1 |
4 files changed, 14 insertions, 35 deletions
diff --git a/apps/files/css/files.scss b/apps/files/css/files.scss index 459d8743a01..85c59294803 100644 --- a/apps/files/css/files.scss +++ b/apps/files/css/files.scss @@ -60,10 +60,6 @@ min-height: 0%; } -#app-content > [id^='app-content-'] { - max-height: calc(100vh - $header-height); -} - .app-files #app-content { transition: background-color 0.3s ease; overflow-x: hidden; diff --git a/core/css/apps.scss b/core/css/apps.scss index 0f189754adb..d35ef25ecaf 100644 --- a/core/css/apps.scss +++ b/core/css/apps.scss @@ -73,10 +73,7 @@ kbd { /* APP-NAVIGATION ------------------------------------------------------------ */ /* Navigation: folder like structure */ #app-navigation { - width: 250px; - /* header height */ - height: calc(100vh - #{$header-height}); - position: fixed; + width: $navigation-width; box-sizing: border-box; background-color: var(--color-main-background); -webkit-user-select: none; @@ -86,6 +83,8 @@ kbd { border-right: 1px solid var(--color-border); display: flex; flex-direction: column; + flex-grow: 0; + flex-shrink: 0; /* 'New' button */ .app-navigation-new { @@ -583,27 +582,21 @@ kbd { box-sizing: border-box; position: relative; overflow-x: hidden; - transition: margin-right 300ms ease-in-out; + display: flex; /* trick: scroll #app-content and not the body * to avoid double scrollbar with sidebar */ max-height: 100vh; - &.with-app-sidebar { - // to force the scrollbar to be visible - // and not under the sidebar - margin-right: 27vw; - max-width: calc(100vw - #{$sidebar-width}); - } } /* APP-CONTENT AND WRAPPER ------------------------------------------ */ /* Part where the content will be loaded into */ #app-content { - margin-left: 250px; z-index: 1000; background-color: var(--color-main-background); position: relative; min-height: calc(100vh - #{$header-height}); + flex-basis: 100vw; /* no top border for first settings item */ > .section:first-child { border-top: none; @@ -639,34 +632,23 @@ kbd { #app-content will be shrinked properly */ #app-sidebar { - position: fixed; - top: $header-height; - left: auto; - bottom: 0; width: 27vw; min-width: $sidebar-width; display: block; + position: relative; background: var(--color-main-background); border-left: 1px solid var(--color-border); overflow-x: hidden; overflow-y: auto; - z-index: 500; - animation: slideAndShow 300ms ease-in-out; - animation-fill-mode: both; + flex-shrink: 0; + transition: 300ms width ease-in-out, + 300ms min-width ease-in-out; &.disappear { - animation: slideAndHide 300ms ease-in-out; - animation-fill-mode: both; + width: 0; + min-width: 0; } } -@keyframes slideAndHide { - 0% {right: 0;} - 99% {right: -100%;} - 100% {right: -100%; display: none;} -} -@keyframes slideAndShow { - 0% {right: -100%;} - 100% {right: 0;} -} + /* APP-SETTINGS ------------------------------------------------------------ */ /* settings area */ diff --git a/core/css/mobile.scss b/core/css/mobile.scss index fa3f0ff20e4..b0f85250493 100644 --- a/core/css/mobile.scss +++ b/core/css/mobile.scss @@ -29,7 +29,7 @@ } #app-content { - margin-left: 0; + margin-left: -$navigation-width; } diff --git a/core/css/variables.scss b/core/css/variables.scss index 86264dc5588..14e3dc663fc 100644 --- a/core/css/variables.scss +++ b/core/css/variables.scss @@ -79,4 +79,5 @@ $font-face: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif !de // various structure data $header-height: 50px; +$navigation-width: 250px; $sidebar-width: 300px;
\ No newline at end of file |