From ed2d97cb556ef617891af995fb147485094ceb5e Mon Sep 17 00:00:00 2001 From: hrs72 Date: Fri, 20 Dec 2024 01:02:30 +0100 Subject: [PATCH 1/2] fix(ui): sidebar gets wider with wide content --- src/pages/docs/[...path]/DocsPage.module.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/docs/[...path]/DocsPage.module.css b/src/pages/docs/[...path]/DocsPage.module.css index bbf690e6..4f9ea36b 100644 --- a/src/pages/docs/[...path]/DocsPage.module.css +++ b/src/pages/docs/[...path]/DocsPage.module.css @@ -7,7 +7,7 @@ --sidebar-min-width: 320px; & .sidebar { - min-width: var(--sidebar-min-width); + width: var(--sidebar-min-width); @media (max-width: 784px) { display: none; From af14ea5078571b577dd1ad2569e735012496c290 Mon Sep 17 00:00:00 2001 From: hrs72 Date: Fri, 20 Dec 2024 01:08:41 +0100 Subject: [PATCH 2/2] refactor: sidebar var names --- src/pages/docs/[...path]/DocsPage.module.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/docs/[...path]/DocsPage.module.css b/src/pages/docs/[...path]/DocsPage.module.css index 4f9ea36b..ff2804bd 100644 --- a/src/pages/docs/[...path]/DocsPage.module.css +++ b/src/pages/docs/[...path]/DocsPage.module.css @@ -4,10 +4,10 @@ margin-top: 0px; max-width: 100%; - --sidebar-min-width: 320px; + --sidebar-width: 320px; & .sidebar { - width: var(--sidebar-min-width); + width: var(--sidebar-width); @media (max-width: 784px) { display: none; @@ -76,7 +76,7 @@ flex-direction: column; margin: 38px auto 88px auto; padding: 0 24px; - max-width: min(800px, calc(100vw - var(--sidebar-min-width))); + max-width: min(800px, calc(100vw - var(--sidebar-width))); flex-grow: 1; @media (max-width: 784px) {