Skip to content

Commit

Permalink
(less) fixes twbs#9310: alerts aren't dismissable by default, now req…
Browse files Browse the repository at this point in the history
…uires .alert-dismissable if you need a close button
  • Loading branch information
mdo committed Aug 12, 2013
1 parent 3b84478 commit b0608f3
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions alerts.less
Expand Up @@ -7,7 +7,7 @@
// -------------------------

.alert {
padding: @alert-padding (@alert-padding + 20) @alert-padding @alert-padding;
padding: @alert-padding;
margin-bottom: @line-height-computed;
color: @alert-text;
background-color: @alert-bg;
Expand All @@ -30,14 +30,6 @@
color: darken(@alert-text, 10%);
}

// Adjust close link position
.close {
position: relative;
top: -2px;
right: -21px;
color: inherit;
}

// Improve alignment and spacing of inner content
> p,
> ul {
Expand All @@ -48,8 +40,25 @@
}
}

// Dismissable alerts
//
// Expand the right padding and account for the close button's positioning.

.alert-dismissable {
padding-right: (@alert-padding + 20);

// Adjust close link position
.close {
position: relative;
top: -2px;
right: -21px;
color: inherit;
}
}

// Alternate styles
// -------------------------
//
// Generate contextual modifier classes for colorizing the alert.

.alert-success {
.alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);
Expand Down

0 comments on commit b0608f3

Please sign in to comment.