mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-07 14:16:47 +02:00
Merge pull request #8404 from cvrebert/alert-variant
extract .alert-variant mix-in
This commit is contained in:
@@ -43,37 +43,13 @@
|
|||||||
// -------------------------
|
// -------------------------
|
||||||
|
|
||||||
.alert-success {
|
.alert-success {
|
||||||
background-color: @alert-success-bg;
|
.alert-variant(@alert-success-bg, @alert-success-border, @alert-success-text);
|
||||||
border-color: @alert-success-border;
|
|
||||||
color: @alert-success-text;
|
|
||||||
hr {
|
|
||||||
border-top-color: darken(@alert-success-border, 5%);
|
|
||||||
}
|
|
||||||
.alert-link {
|
|
||||||
color: darken(@alert-success-text, 10%);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.alert-danger {
|
.alert-danger {
|
||||||
background-color: @alert-danger-bg;
|
.alert-variant(@alert-danger-bg, @alert-danger-border, @alert-danger-text);
|
||||||
border-color: @alert-danger-border;
|
|
||||||
color: @alert-danger-text;
|
|
||||||
hr {
|
|
||||||
border-top-color: darken(@alert-danger-border, 5%);
|
|
||||||
}
|
|
||||||
.alert-link {
|
|
||||||
color: darken(@alert-danger-text, 10%);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.alert-info {
|
.alert-info {
|
||||||
background-color: @alert-info-bg;
|
.alert-variant(@alert-info-bg, @alert-info-border, @alert-info-text);
|
||||||
border-color: @alert-info-border;
|
|
||||||
color: @alert-info-text;
|
|
||||||
hr {
|
|
||||||
border-top-color: darken(@alert-info-border, 5%);
|
|
||||||
}
|
|
||||||
.alert-link {
|
|
||||||
color: darken(@alert-info-text, 10%);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Block alerts
|
// Block alerts
|
||||||
|
@@ -361,6 +361,20 @@
|
|||||||
border-bottom: 1px solid @bottom;
|
border-bottom: 1px solid @bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Alerts
|
||||||
|
// -------------------------
|
||||||
|
.alert-variant(@background, @border, @text-color) {
|
||||||
|
background-color: @background;
|
||||||
|
border-color: @border;
|
||||||
|
color: @text-color;
|
||||||
|
hr {
|
||||||
|
border-top-color: darken(@border, 5%);
|
||||||
|
}
|
||||||
|
.alert-link {
|
||||||
|
color: darken(@text-color, 10%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Button psuedo states
|
// Button psuedo states
|
||||||
// -------------------------
|
// -------------------------
|
||||||
// Easily pump out default styles, as well as :hover, :focus, :active,
|
// Easily pump out default styles, as well as :hover, :focus, :active,
|
||||||
|
Reference in New Issue
Block a user