alerts.less 1.34 KB
Newer Older
1
2
3
4
5
6
7
//
// Alerts
// --------------------------------------------------


// Base styles
// -------------------------
8

9
.alert {
10
  padding: @alert-padding (@alert-padding + 20) @alert-padding @alert-padding;
Mark Otto's avatar
Mark Otto committed
11
  margin-bottom: @line-height-computed;
Mark Otto's avatar
Mark Otto committed
12
13
14
15
  color: @alert-text;
  background-color: @alert-bg;
  border: 1px solid @alert-border;
  border-radius: @alert-border-radius;
16
17
18
19
20
21
22
23
24

  // 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 {
Mark Otto's avatar
Mark Otto committed
25
    border-top-color: darken(@alert-border, 5%);
26
  }
Mark Otto's avatar
Mark Otto committed
27
28
  // Provide class for links that match alerts
  .alert-link {
syed's avatar
syed committed
29
    font-weight: @alert-link-font-weight;
Mark Otto's avatar
Mark Otto committed
30
    color: darken(@alert-text, 10%);
31
  }
32

33
34
35
36
37
38
39
  // Adjust close link position
  .close {
    position: relative;
    top: -2px;
    right: -21px;
    color: inherit;
  }
40
41
42
43
44
45
46
47
48

  // Improve alignment and spacing of inner content
  > p,
  > ul {
    margin-bottom: 0;
  }
  > p + p {
    margin-top: 5px;
  }
49
}
50

51
// Alternate styles
52
// -------------------------
53

54
.alert-success {
55
  .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);
56
}
57
.alert-danger {
58
  .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);
59
}
60
.alert-info {
61
  .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);
62
}