From dd3f7047d69e3924368cbfb0bd87679b37577a2d Mon Sep 17 00:00:00 2001 From: Alexander Chabin Date: Wed, 20 Dec 2023 10:45:58 +0500 Subject: [PATCH] Move html/body rules to globals.css --- components/AboutProjectModal/Modal/Modal.module.css | 7 ------- {consts => components/AboutProjectModal/Team}/team.json | 0 styles/globals.css | 7 +++++++ 3 files changed, 7 insertions(+), 7 deletions(-) rename {consts => components/AboutProjectModal/Team}/team.json (100%) diff --git a/components/AboutProjectModal/Modal/Modal.module.css b/components/AboutProjectModal/Modal/Modal.module.css index 8a157824..fe1a315a 100644 --- a/components/AboutProjectModal/Modal/Modal.module.css +++ b/components/AboutProjectModal/Modal/Modal.module.css @@ -10,12 +10,6 @@ animation: .2s ease-in-out fadeIn; } -html:has(.Modal[open]), -body:has(.Modal[open]) { - overflow: auto; - height: 100%; -} - .Modal::backdrop { background: rgba(12, 27, 39, .2); } @@ -83,7 +77,6 @@ body:has(.Modal[open]) { .Modal { width: 100%; max-width: 647px; - min-height: auto; max-height: calc(100vh - 112px); margin: 60px auto; border-radius: 16px; diff --git a/consts/team.json b/components/AboutProjectModal/Team/team.json similarity index 100% rename from consts/team.json rename to components/AboutProjectModal/Team/team.json diff --git a/styles/globals.css b/styles/globals.css index c4a9d83a..668f78b3 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -20,6 +20,13 @@ html { } } +/* Remove scrollbar when modal open */ +html:has(dialog[open]), +body:has(dialog[open]) { + overflow: auto; + height: 100%; +} + body { overflow-x: hidden; font-weight: 300;