mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-30 16:50:00 +02:00
update alert component to use theme sass map and add a ton of options in the process
This commit is contained in:
@@ -41,15 +41,8 @@
|
||||
//
|
||||
// Generate contextual modifier classes for colorizing the alert.
|
||||
|
||||
.alert-success {
|
||||
@include alert-variant($alert-success-bg, $alert-success-border-color, $alert-success-text);
|
||||
}
|
||||
.alert-info {
|
||||
@include alert-variant($alert-info-bg, $alert-info-border-color, $alert-info-text);
|
||||
}
|
||||
.alert-warning {
|
||||
@include alert-variant($alert-warning-bg, $alert-warning-border-color, $alert-warning-text);
|
||||
}
|
||||
.alert-danger {
|
||||
@include alert-variant($alert-danger-bg, $alert-danger-border-color, $alert-danger-text);
|
||||
@each $color, $value in $theme-colors {
|
||||
.alert-#{$color} {
|
||||
@include alert-variant(theme-color-level($color, -10), theme-color-level($color, -9), theme-color-level($color, 6));
|
||||
}
|
||||
}
|
||||
|
@@ -1,14 +1,13 @@
|
||||
// Alerts
|
||||
|
||||
@mixin alert-variant($background, $border, $body-color) {
|
||||
color: $body-color;
|
||||
@mixin alert-variant($background, $border, $color) {
|
||||
color: $color;
|
||||
background-color: $background;
|
||||
border-color: $border;
|
||||
|
||||
hr {
|
||||
border-top-color: darken($border, 5%);
|
||||
}
|
||||
|
||||
.alert-link {
|
||||
color: darken($body-color, 10%);
|
||||
color: darken($color, 10%);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user