From 6516d19a7623806924626643c58c6977c563a58f Mon Sep 17 00:00:00 2001 From: Ben Larson Date: Sun, 20 Sep 2020 16:05:29 -0500 Subject: [PATCH] Dim body when nav open (#13) --- src/components/menu.css | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/menu.css b/src/components/menu.css index 2cb2a41..7e5ecc9 100644 --- a/src/components/menu.css +++ b/src/components/menu.css @@ -14,15 +14,20 @@ .Menu-Closer { z-index: 8; + pointer-events: none; position: fixed; + opacity: 0; top: 0; left: 0; - width: 0; + width: 100vw; height: 100vh; + background-color: rgba(0, 0, 0, 0.2); + transition: opacity 0.2s; } .isNavOpen .Menu-Closer { - width: 100vw; + pointer-events: initial; + opacity: 1; } .Menu-Button { -- 2.45.2