Skip to content

Commit

Permalink
fix(modal): adjust scroll classes (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlmoravek authored Jul 17, 2024
1 parent 9460840 commit 47e52ea
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
5 changes: 0 additions & 5 deletions src/assets/scss/components/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@
// $modal-scale-transform: scale(1.02);
/* @bootstrap docs */

html.modal-open {
overflow: hidden;
padding-right: 1rem;
}

.modal {
display: flex;

Expand Down
21 changes: 19 additions & 2 deletions src/assets/scss/utils/_utility.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,24 @@
}
}

// Utlity classes
// global scroll classes

html.scroll-clipped,
body.scroll-clipped {
overflow: hidden;
padding-right: 1rem;
}

html.scroll-hidden,
body.scroll-hidden {
position: fixed;
width: 100%;
bottom: 0;
overflow-x: hidden;
overflow-y: scroll;
}

// utlity classes

.clickable {
cursor: pointer;
Expand Down Expand Up @@ -52,7 +69,7 @@
height: unset;
}

// Utility classes for text
// utility classes for text

.text-right {
text-align: right;
Expand Down
6 changes: 4 additions & 2 deletions src/plugins/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ const bootstrapConfig: OrugaOptions = {
itemDisabledClass: "disabled",
mobileClass: "dropdown-modal",
teleportClass: "teleported",
// scrollClipClass: "scroll-clipped",
// noScrollClass: "scroll-hidden",
},
datepicker: {
override: true,
Expand Down Expand Up @@ -243,8 +245,8 @@ const bootstrapConfig: OrugaOptions = {
closeClass: "btn-close",
fullScreenClass: "fullscreen",
mobileClass: "mobile",
scrollClipClass: "modal-open",
noScrollClass: "noScroll",
scrollClipClass: "scroll-clipped",
noScrollClass: "scroll-hidden",
},
notification: {
override: true,
Expand Down

0 comments on commit 47e52ea

Please sign in to comment.