Skip to content

Commit

Permalink
Merge pull request #20933 from twbs/alert-padding-vars
Browse files Browse the repository at this point in the history
Switch to separate vars for alert vertical/horizontal padding
  • Loading branch information
mdo authored Oct 19, 2016
2 parents 1543738 + 6321f93 commit 16947ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions scss/_alert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

.alert {
padding: $alert-padding;
padding: $alert-padding-y $alert-padding-x;
margin-bottom: $spacer-y;
border: $alert-border-width solid transparent;
@include border-radius($alert-border-radius);
Expand All @@ -26,13 +26,13 @@
// Expand the right padding and account for the close button's positioning.

.alert-dismissible {
padding-right: ($alert-padding * 2);
padding-right: ($alert-padding-x * 2);

// Adjust close link position
.close {
position: relative;
top: -.125rem;
right: -$alert-padding;
right: -$alert-padding-x;
color: inherit;
}
}
Expand Down
3 changes: 2 additions & 1 deletion scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,8 @@ $modal-sm: 300px !default;
//
// Define alert colors, border radius, and padding.

$alert-padding: 1rem !default;
$alert-padding-x: 1.25rem !default;
$alert-padding-y: .75rem !default;
$alert-border-radius: $border-radius !default;
$alert-link-font-weight: bold !default;
$alert-border-width: $border-width !default;
Expand Down

0 comments on commit 16947ff

Please sign in to comment.