From 245b9d27bc10a4d8c8eb64add06b653f12763f56 Mon Sep 17 00:00:00 2001 From: Kim <1877318+kimsible@users.noreply.github.com> Date: Mon, 17 Aug 2020 10:17:54 +0200 Subject: On touchscreens add content overlay for opened menu (#3088) * Overflow:hidden on touchscreen when modal-open * Do not display menu by default on touchscreens * Add content overlay on touchscreens when menu is opened * Fix zIndex overlay for search infos * On touchscreens close menu on swipe left Co-authored-by: kimsible --- client/src/sass/bootstrap.scss | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'client/src/sass/bootstrap.scss') diff --git a/client/src/sass/bootstrap.scss b/client/src/sass/bootstrap.scss index 308a28658..a3b60198c 100644 --- a/client/src/sass/bootstrap.scss +++ b/client/src/sass/bootstrap.scss @@ -150,6 +150,29 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; width: 100vw; // Make sure the content fits all the available width } +// On touchscreen devices, simply overflow: hidden to avoid detached overlay on scroll +@media (hover: none) and (pointer: coarse) { + .modal-open, .menu-open { + overflow: hidden !important; + } + + // On touchscreen devices display content overlay when opened menu + .menu-open { + .main-col { + &::before { + background-color: black; + width: 100vw; + height: 100vh; + opacity: 0.75; + content: ''; + display: block; + position: fixed; + z-index: z('header') - 1; + } + } + } +} + // Nav customizations .nav .nav-link { display: flex !important; -- cgit v1.2.3