_alert.scss 1.13 KB
Newer Older
Mark Otto's avatar
Mark Otto committed
1
//
2
// Base styles
Mark Otto's avatar
Mark Otto committed
3
//
4

5
.alert {
6
  position: relative;
7
  padding: $alert-padding-y $alert-padding-x;
8
  margin-bottom: $alert-margin-bottom;
9
  border: $alert-border-width solid transparent;
Mark Otto's avatar
Mark Otto committed
10
  @include border-radius($alert-border-radius);
11
}
12

13
14
15
16
17
18
19
20
21
22
23
// Headings for larger alerts
.alert-heading {
  // Specified to prevent conflicts of changing $headings-color
  color: inherit;
}

// Provide class for links that match alerts
.alert-link {
  font-weight: $alert-link-font-weight;
}

Mark Otto's avatar
Mark Otto committed
24

Bas Bosman's avatar
Bas Bosman committed
25
// Dismissible alerts
26
27
28
//
// Expand the right padding and account for the close button's positioning.

Bas Bosman's avatar
Bas Bosman committed
29
.alert-dismissible {
30
  padding-right: $alert-dismissible-padding-r;
31

32
  // Adjust close link position
33
  .btn-close {
34
35
36
    position: absolute;
    top: 0;
    right: 0;
37
    padding: $alert-padding-y * 1.25 $alert-padding-x;
38
39
40
  }
}

Mark Otto's avatar
Mark Otto committed
41

42
// scss-docs-start alert-modifiers
43
// Generate contextual modifier classes for colorizing the alert.
44

45
46
@each $color, $value in $theme-colors {
  .alert-#{$color} {
47
    @include alert-variant(color-level($value, $alert-bg-level), color-level($value, $alert-border-level), color-level($value, $alert-color-level));
48
  }
49
}
50
// scss-docs-end alert-modifiers