Skip to content

Commit 7bd1bc2

Browse files
MartijnCuppensmdo
authored andcommitted
Allow multiple ways of padding declaration for modal header (twbs#26976)
* twbs#26967: Allow multiple ways of padding declaration for modal header * twbs#26976: split vertical and horizontal modal padding
1 parent 0bec1c8 commit 7bd1bc2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

scss/_modal.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
.close {
109109
padding: $modal-header-padding;
110110
// auto on the left force icon to the right even when there is no .modal-title
111-
margin: (-$modal-header-padding) (-$modal-header-padding) (-$modal-header-padding) auto;
111+
margin: (-$modal-header-padding-y) (-$modal-header-padding-x) (-$modal-header-padding-y) auto;
112112
}
113113
}
114114

scss/_variables.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,9 @@ $modal-header-border-color: $gray-200 !default;
854854
$modal-footer-border-color: $modal-header-border-color !default;
855855
$modal-header-border-width: $modal-content-border-width !default;
856856
$modal-footer-border-width: $modal-header-border-width !default;
857-
$modal-header-padding: 1rem !default;
857+
$modal-header-padding-y: 1rem !default;
858+
$modal-header-padding-x: 1rem !default;
859+
$modal-header-padding: $modal-header-padding-y $modal-header-padding-x !default; // Keep this for backwards compatibility
858860

859861
$modal-xl: 1140px !default;
860862
$modal-lg: 800px !default;

0 commit comments

Comments
 (0)