Bootstrap: Alert color variables missing

Created on 10 Sep 2017  路  5Comments  路  Source: twbs/bootstrap

Beta-1 seems to be missing the alert color values from Alpha.6; was there any particular reason they were removed? How do we now control the background colors and borders for alerts?

css v4

All 5 comments

23750 issue and others are talking about the same subject.

Color variables are now on the theme map here:
https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss#L64-L74

What about the new alert changes in beta:

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

@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));
  }
}

It looks like "($color, -10)" the -10 is changing the color for alert. That is not variable related...

Closing as we don't have alert vars anymore.

can anyone explain how it's getting the background color? I want to understand how it takes the $color and what it's doing to make it 'lighter'. It doesn't appear to be a simple 'lighten' color function.

@cholybran

Its frustrating right? Almost like it has a mind of its own... o.O

Was this page helpful?
0 / 5 - 0 ratings