From 8a46413d6fa6ff671f780b60c7bc6380d84dc25d Mon Sep 17 00:00:00 2001 From: Li Kui <90845831+likui628@users.noreply.github.com> Date: Fri, 15 Jul 2022 14:25:57 +0800 Subject: [PATCH] fix(theme): navbar menu may exceed the screen (#988) (#989) Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> --- src/client/theme-default/components/VPMenu.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/client/theme-default/components/VPMenu.vue b/src/client/theme-default/components/VPMenu.vue index 7dad2062d2ec..15249aca44f6 100644 --- a/src/client/theme-default/components/VPMenu.vue +++ b/src/client/theme-default/components/VPMenu.vue @@ -29,6 +29,14 @@ defineProps<{ background-color: var(--vp-c-bg); box-shadow: var(--vp-shadow-3); transition: background-color 0.5s; + max-height: calc(100vh - var(--vp-nav-height-mobile)); + overflow-y: auto; +} + +@media (min-width: 960px) { + .VPMenu { + max-height: calc(100vh - var(--vp-nav-height-desktop)); + } } .dark .VPMenu {