Skip to content

Commit

Permalink
Fix modal overflow style nesting (#26742)
Browse files Browse the repository at this point in the history
Nest `.modal` styling directly under `.modal-open`
to avoid issues when bootstrap is nested.
  • Loading branch information
jdanil authored and mdo committed Jul 20, 2018
1 parent 23e4d48 commit c04d60b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scss/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@
// .modal-content - actual modal w/ bg and corners and stuff


// Kill the scroll on the body
.modal-open {
// Kill the scroll on the body
overflow: hidden;

.modal {
overflow-x: hidden;
overflow-y: auto;
}
}

// Container that the modal scrolls within
Expand All @@ -25,11 +30,6 @@
// We deliberately don't use `-webkit-overflow-scrolling: touch;` due to a
// gnarly iOS Safari bug: https://bugs.webkit.org/show_bug.cgi?id=158342
// See also https://github.com/twbs/bootstrap/issues/17695

.modal-open & {
overflow-x: hidden;
overflow-y: auto;
}
}

// Shell div to position the modal with bottom padding
Expand Down

0 comments on commit c04d60b

Please sign in to comment.