aboutsummaryrefslogtreecommitdiff
path: root/scss/_modal.scss
diff options
context:
space:
mode:
authorysds <[email protected]>2020-02-27 17:30:06 +0200
committerXhmikosR <[email protected]>2020-04-01 10:05:43 +0300
commit062002d9521e2d3d77e9880f8b151bbbf05ef085 (patch)
tree2f52657224747cb0f1a304b2bc07b49a783ae3bb /scss/_modal.scss
parente138decdbb3597813c762995753db52abfbc76fb (diff)
downloadbootstrap-062002d9521e2d3d77e9880f8b151bbbf05ef085.tar.xz
bootstrap-062002d9521e2d3d77e9880f8b151bbbf05ef085.zip
Fix CSS and improve docs
Diffstat (limited to 'scss/_modal.scss')
-rw-r--r--scss/_modal.scss33
1 files changed, 19 insertions, 14 deletions
diff --git a/scss/_modal.scss b/scss/_modal.scss
index b91848d8b..d898a6b0b 100644
--- a/scss/_modal.scss
+++ b/scss/_modal.scss
@@ -62,11 +62,6 @@
overflow: hidden;
}
- .modal-header,
- .modal-footer {
- flex-shrink: 0;
- }
-
.modal-body {
overflow-y: auto;
}
@@ -116,6 +111,7 @@
// Top section of the modal w/ title and dismiss
.modal-header {
display: flex;
+ flex-shrink: 0;
align-items: flex-start; // so the close btn always stays on the upper right corner
justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
padding: $modal-header-padding;
@@ -143,13 +139,13 @@
// when there should be a fixed height on `.modal-dialog`.
flex: 1 1 auto;
padding: $modal-inner-padding;
- overflow-y: auto;
}
// Footer (for actions)
.modal-footer {
display: flex;
flex-wrap: wrap;
+ flex-shrink: 0;
align-items: center; // vertically center
justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
padding: $modal-inner-padding - $modal-footer-margin-between / 2;
@@ -207,16 +203,25 @@
.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);
+ $next-breakpoint: breakpoint-next($breakpoint);
+ $postfix: if(breakpoint-max($breakpoint, $grid-breakpoints) == null, "", "-#{$next-breakpoint}-down");
- .modal-fullscreen#{$infix}-down {
- @include modalFullscreen();
+ @include media-breakpoint-down($breakpoint) {
+ .modal-fullscreen#{$postfix} {
+ width: 100vw;
+ max-width: none;
+ height: 100%;
+ margin: 0;
+
+ .modal-content {
+ border: 0;
+ @include border-radius(0);
+ }
+
+ .modal-body {
+ overflow-y: auto;
+ }
}
}
}