From 33d3ce46c42d91e19b16b4253549ac62da334877 Mon Sep 17 00:00:00 2001 From: Xanazf Date: Fri, 18 Oct 2024 00:00:00 +0300 Subject: [PATCH] small fixes for the previous pushes --- src/components/navigation/sidebars/nav/index.tsx | 1 - src/components/navigation/sidebars/toc/index.tsx | 1 - src/styles/docs/nav/nav.css | 5 +++++ src/styles/docs/toc/toc.css | 5 +++++ src/styles/global.css | 8 ++++++-- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/components/navigation/sidebars/nav/index.tsx b/src/components/navigation/sidebars/nav/index.tsx index ef12817..8ba78de 100644 --- a/src/components/navigation/sidebars/nav/index.tsx +++ b/src/components/navigation/sidebars/nav/index.tsx @@ -56,7 +56,6 @@ const NavComponent: Component = props => { createEffect(() => { if (open()) { window.addEventListener("click", handleClickOutside); - document.body.style.overflow = "hidden"; document.body.classList.add("overflow-nav"); document.body.classList.add("dim-content-nav"); } else { diff --git a/src/components/navigation/sidebars/toc/index.tsx b/src/components/navigation/sidebars/toc/index.tsx index 02db574..64eb910 100644 --- a/src/components/navigation/sidebars/toc/index.tsx +++ b/src/components/navigation/sidebars/toc/index.tsx @@ -53,7 +53,6 @@ const TableOfContents: Component = props => { document.body.classList.add("dim-content-toc"); } else { window.removeEventListener("click", handleClickOutside); - document.body.style.overflow = "auto"; document.body.classList.remove("overflow-toc"); document.body.classList.remove("dim-content-toc"); } diff --git a/src/styles/docs/nav/nav.css b/src/styles/docs/nav/nav.css index ce91117..78898d8 100644 --- a/src/styles/docs/nav/nav.css +++ b/src/styles/docs/nav/nav.css @@ -156,6 +156,11 @@ } @media (min-width: 85rem) { + .dim-content-nav .docslayout-root { + filter: brightness(100%) !important; + pointer-events: initial !important; + } + .nav-wrapper-mobile { display: none; } diff --git a/src/styles/docs/toc/toc.css b/src/styles/docs/toc/toc.css index 82f184f..af96edc 100644 --- a/src/styles/docs/toc/toc.css +++ b/src/styles/docs/toc/toc.css @@ -84,6 +84,11 @@ } @media (min-width: 65rem) { + .dim-content-toc .docslayout-root { + filter: unset !important; + pointer-events: initial !important; + } + .toc-wrapper { width: 19rem; flex-shrink: 0; diff --git a/src/styles/global.css b/src/styles/global.css index c09fe7b..2d888de 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -56,8 +56,12 @@ html.dark { all: unset; } -.overflow-nav, -.overflow-toc { +body { + overflow: auto; +} + +body.overflow-nav, +body.overflow-toc { overflow: hidden; }