Skip to content

Commit

Permalink
adds modal-dialog-centered class to docs and removes margin to avoid …
Browse files Browse the repository at this point in the history
…generating a vertical scrolling
  • Loading branch information
andresgalante committed Oct 23, 2017
1 parent 30263f2 commit 95384fb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/4.0/components/modal.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ When modals become too long for the user's viewport or device, they scroll indep
Add `.modal-dialog-centered` to `.modal-dialog` to vertically center the modal.

<div id="exampleModalCenter" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenter" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalCenterTitle">Modal title</h5>
Expand Down
6 changes: 6 additions & 0 deletions scss/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,17 @@
margin: $modal-dialog-margin-y-sm-up auto;
}

.modal-dialog-centered {
margin-top: 0;
margin-bottom: 0;
}

.modal-content {
@include box-shadow($modal-content-box-shadow-sm-up);
}

.modal-sm { max-width: $modal-sm; }

}

@include media-breakpoint-up(lg) {
Expand Down

0 comments on commit 95384fb

Please sign in to comment.