From b38e9c727bf27bfd342168aa4dbd4f17aeea3c52 Mon Sep 17 00:00:00 2001 From: zombieFox Date: Mon, 17 Feb 2020 15:25:23 +0000 Subject: [PATCH] [design] animate menu sub nav --- src/css/menu.css | 10 ++++++++-- src/html/menu/menu-nav.html | 14 +++++++------- src/js/menu.js | 32 ++++++++++++++++++++++++-------- 3 files changed, 39 insertions(+), 17 deletions(-) diff --git a/src/css/menu.css b/src/css/menu.css index 74e4fca8..8fd55dea 100755 --- a/src/css/menu.css +++ b/src/css/menu.css @@ -165,7 +165,6 @@ .menu-nav .menu-nav-tab { padding-left: calc(var(--menu-space) * 2); padding-right: calc(var(--menu-space) * 2); - height: 3.5em; justify-content: flex-start; } @@ -174,6 +173,13 @@ display: flex; flex-direction: column; flex-wrap: nowrap; + overflow: hidden; + height: 0; + transition: height var(--layout-timing-fast); + } + + .menu-nav-body.active { + height: var(--menu-nav-body-height); } .is-edge .menu-nav-body { @@ -214,6 +220,7 @@ padding-left: calc(var(--menu-space) * 5); border-radius: 0; height: 3em; + min-height: 3em; width: 100%; line-height: 1; justify-content: flex-start; @@ -246,6 +253,5 @@ .menu { width: 60vw; max-width: 60em; - max-height: 60em; } } diff --git a/src/html/menu/menu-nav.html b/src/html/menu/menu-nav.html index 29f32874..9ef5614a 100644 --- a/src/html/menu/menu-nav.html +++ b/src/html/menu/menu-nav.html @@ -1,7 +1,7 @@