Skip to content

Commit

Permalink
Move html/body rules to globals.css
Browse files Browse the repository at this point in the history
  • Loading branch information
sashachabin committed Dec 20, 2023
1 parent b51d3f5 commit 94f4556
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 0 additions & 7 deletions components/AboutProjectModal/Modal/Modal.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 7 additions & 0 deletions styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

1 comment on commit 94f4556

@ekbdev
Copy link

@ekbdev ekbdev commented on 94f4556 Dec 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for guides ready!

✅ Preview
https://guides-8scm06xsr-ekbdev.vercel.app
https://eguides-about-project-modal.vercel.app

Built with commit 94f4556.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.