0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00
Bootstrap/less/alerts.less
2013-03-31 17:24:06 -07:00

99 lines
1.9 KiB
Plaintext

//
// Alerts
// --------------------------------------------------
// Base styles
// -------------------------
.alert {
padding: 8px 35px 8px 14px;
margin-bottom: @line-height-base;
color: @state-warning-text;
background-color: @state-warning-bg;
border: 1px solid @state-warning-border;
border-radius: @border-radius-base;
// Headings for larger alerts
h4 {
margin-top: 0;
// Specified for the h4 to prevent conflicts of changing @headingsColor
color: inherit;
}
// Match the hr to the border of the alert
hr {
border-top-color: darken(@state-warning-border, 5%);
}
// Inherit color for immediate links and bolden them some
> a,
> p > a {
font-weight: 500;
color: darken(@state-warning-text, 10%);
}
}
// Adjust close link position
.close {
position: relative;
top: -2px;
right: -21px;
line-height: @line-height-base;
color: inherit;
}
// Alternate styles
// -------------------------
.alert-success {
background-color: @state-success-bg;
border-color: @state-success-border;
color: @state-success-text;
hr {
border-top-color: darken(@state-success-border, 5%);
}
> a,
> p > a {
color: darken(@state-success-text, 10%);
}
}
.alert-danger,
.alert-error {
background-color: @state-danger-bg;
border-color: @state-danger-border;
color: @state-danger-text;
hr {
border-top-color: darken(@state-danger-border, 5%);
}
> a,
> p > a {
color: darken(@state-danger-text, 10%);
}
}
.alert-info {
background-color: @state-info-bg;
border-color: @state-info-border;
color: @state-info-text;
hr {
border-top-color: darken(@state-info-border, 5%);
}
> a,
> p > a {
color: darken(@state-info-text, 10%);
}
}
// Block alerts
// -------------------------
.alert-block {
padding-top: 14px;
padding-bottom: 14px;
}
.alert-block > p,
.alert-block > ul {
margin-bottom: 0;
}
.alert-block p + p {
margin-top: 5px;
}