Add Full-Screen size to Modal and Responsive variations for breakpoints
(Works from breakpoint and down)
This commit is contained in:
parent
053d5d5e93
commit
e138decdbb
4 changed files with 187 additions and 0 deletions
|
|
@ -26,6 +26,7 @@
|
|||
@import "mixins/pagination";
|
||||
@import "mixins/lists";
|
||||
@import "mixins/list-group";
|
||||
@import "mixins/modal";
|
||||
@import "mixins/forms";
|
||||
@import "mixins/table-row";
|
||||
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@
|
|||
flex-direction: column;
|
||||
width: 100%; // Ensure `.modal-content` extends the full width of the parent `.modal-dialog`
|
||||
// counteract the pointer-events: none; in the .modal-dialog
|
||||
height: 100%;
|
||||
color: $modal-content-color;
|
||||
pointer-events: auto;
|
||||
background-color: $modal-content-bg;
|
||||
|
|
@ -142,6 +143,7 @@
|
|||
// when there should be a fixed height on `.modal-dialog`.
|
||||
flex: 1 1 auto;
|
||||
padding: $modal-inner-padding;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
// Footer (for actions)
|
||||
|
|
@ -204,3 +206,17 @@
|
|||
@include media-breakpoint-up(xl) {
|
||||
.modal-xl { max-width: $modal-xl; }
|
||||
}
|
||||
|
||||
.modal-fullscreen {
|
||||
@include modalFullscreen();
|
||||
}
|
||||
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
@include media-breakpoint-down($breakpoint) {
|
||||
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
||||
|
||||
.modal-fullscreen#{$infix}-down {
|
||||
@include modalFullscreen();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
14
scss/mixins/_modal.scss
Normal file
14
scss/mixins/_modal.scss
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// Modal
|
||||
|
||||
// Maximize modal to cover viewport
|
||||
@mixin modalFullscreen {
|
||||
width: 100vw;
|
||||
max-width: none;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
|
||||
.modal-content {
|
||||
border: 0;
|
||||
@include border-radius(0);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue