From ed0ceda85270e1ea321e069dc15dec55418197af Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Wed, 30 Dec 2020 02:48:23 -0700 Subject: [PATCH] simplify computed height for nav menu panel; use var for nav explore panel (max) height --- src/css/nav.css | 10 ++-------- src/css/vars.css | 4 ++-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/css/nav.css b/src/css/nav.css index 80b7cbe..06e2eeb 100644 --- a/src/css/nav.css +++ b/src/css/nav.css @@ -62,13 +62,7 @@ html.is-clipped--nav { .nav-panel-menu { overflow-y: scroll; - height: var(--nav-panel-height); -} - -@media screen and (min-width: 1024px) { - .nav-panel-menu { - height: var(--nav-panel-height--desktop); - } + height: var(--nav-panel-menu-height); } .nav-panel-menu:not(.is-active) .nav-menu { @@ -168,7 +162,7 @@ html.is-clipped--nav { .nav-panel-explore:not(:first-child) { top: auto; - max-height: calc(50% + var(--drawer-height)); + max-height: var(--nav-panel-explore-height); } .nav-panel-explore .context { diff --git a/src/css/vars.css b/src/css/vars.css index c13a789..a6f4590 100644 --- a/src/css/vars.css +++ b/src/css/vars.css @@ -125,8 +125,8 @@ --body-min-height: calc(100vh - var(--body-top)); --nav-height: calc(var(--body-min-height) - var(--toolbar-height)); --nav-height--desktop: var(--body-min-height); - --nav-panel-height: calc(var(--nav-height) - var(--drawer-height)); - --nav-panel-height--desktop: calc(var(--nav-height--desktop) - var(--drawer-height)); + --nav-panel-menu-height: calc(100% - var(--drawer-height)); + --nav-panel-explore-height: calc(50% + var(--drawer-height)); --nav-width: calc(270 / var(--rem-base) * 1rem); --toc-top: calc(var(--body-top) + var(--toolbar-height)); --toc-height: calc(100vh - var(--toc-top) - 2.5rem); -- 2.11.0