From 5c67cd7271df44950b4ed469c87fdc7538c5045f Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Sat, 20 Jun 2020 02:20:40 +1200 Subject: [PATCH] Improve side bar width animation --- src/renderer/components/side-nav/side-nav.css | 15 +- src/renderer/components/side-nav/side-nav.vue | 184 +++++++++--------- 2 files changed, 106 insertions(+), 93 deletions(-) diff --git a/src/renderer/components/side-nav/side-nav.css b/src/renderer/components/side-nav/side-nav.css index 0be50dbd..bcd129f2 100644 --- a/src/renderer/components/side-nav/side-nav.css +++ b/src/renderer/components/side-nav/side-nav.css @@ -2,19 +2,30 @@ display: block; height: calc(100vh - 60px); width: 200px; - overflow-y: auto; + overflow-x: hidden; position: fixed; left: 0px; top: 0px; z-index: 1; margin-top: 60px; - -webkit-box-shadow: 1px -1px 1px -1px var(--primary-shadow-color); + box-shadow: 1px -1px 1px -1px var(--primary-shadow-color); background-color: var(--side-nav-color); transition-property: width; transition-duration: 150ms; transition-timing-function: ease-in-out; } +.inner { + height: 100%; + width: 200px; + overflow-y: auto; + overflow-x: hidden; +} + +.closed .inner { + width: 80px; +} + .topNavOption { margin-top: 10px; } diff --git a/src/renderer/components/side-nav/side-nav.vue b/src/renderer/components/side-nav/side-nav.vue index 30435826..b4d3e362 100644 --- a/src/renderer/components/side-nav/side-nav.vue +++ b/src/renderer/components/side-nav/side-nav.vue @@ -4,99 +4,101 @@ class="sideNav" :class="{closed: !isOpen}" > - - - - - - -
- - -