Skip to content

Commit

Permalink
Fix margin in scss instead
Browse files Browse the repository at this point in the history
  • Loading branch information
MewenLeHo committed Dec 12, 2022
1 parent d76e230 commit 8f6a63f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scss/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
--#{$prefix}modal-header-border-color: #{$modal-header-border-color};
--#{$prefix}modal-header-border-width: #{$modal-header-border-width};
--#{$prefix}modal-title-line-height: #{$modal-title-line-height};
--#{$prefix}modal-body-margin-bottom: #{$modal-body-margin-bottom};
--#{$prefix}modal-body-margin-sm-bottom: #{$modal-body-margin-sm-bottom};
--#{$prefix}modal-footer-gap: #{$modal-footer-margin-between};
--#{$prefix}modal-footer-bg: #{$modal-footer-bg};
--#{$prefix}modal-footer-border-color: #{$modal-footer-border-color};
Expand Down Expand Up @@ -181,6 +183,7 @@
// when there should be a fixed height on `.modal-dialog`.
flex: 1 1 auto;
padding: var(--#{$prefix}modal-padding);
margin-bottom: var(--#{$prefix}modal-body-margin-bottom);
}

// Footer (for actions)
Expand Down Expand Up @@ -217,6 +220,10 @@
margin-left: auto;
}

.modal-body {
margin-bottom: var(--#{$prefix}modal-body-margin-sm-bottom);
}

.modal-sm {
--#{$prefix}modal-width: #{$modal-sm};
}
Expand Down
3 changes: 3 additions & 0 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1696,6 +1696,9 @@ $modal-header-padding-y: 0 !default;
$modal-header-padding-x: $spacer !default;
$modal-header-padding: $modal-header-padding-y $modal-header-padding-x !default; // Keep this for backwards compatibility

$modal-body-margin-bottom: $spacer * .5 !default; // Boosted mod
$modal-body-margin-sm-bottom: $spacer !default; // Boosted mod

$modal-footer-bg: null !default;
$modal-footer-border-color: null !default; // Boosted mod
$modal-footer-border-width: $modal-header-border-width !default;
Expand Down

0 comments on commit 8f6a63f

Please sign in to comment.