Skip to content

Commit

Permalink
feat: add modal-open utility class (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
saadeghi committed Aug 21, 2021
1 parent fb7ccf4 commit 9ce82f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/styled/modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@apply transform translate-y-10 sm:translate-y-0 sm:scale-90 transition duration-200 ease-in-out rounded-t-box sm:rounded-b-box bg-base-100 sm:max-w-lg p-6 w-full;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
}
.modal-open .modal-box,
.modal-toggle:checked ~ .modal .modal-box,
.modal:target .modal-box{
@apply translate-y-0 scale-100;
Expand Down
1 change: 1 addition & 0 deletions src/components/unstyled/modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@apply inset-0 invisible opacity-0 pointer-events-none fixed flex items-end justify-center sm:items-center;
z-index: 999;
}
.modal-open,
.modal:target,
.modal-toggle:checked ~ .modal{
@apply visible opacity-100 pointer-events-auto;
Expand Down

0 comments on commit 9ce82f3

Please sign in to comment.