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


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

9
.alert {
10
  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
40
  // Improve alignment and spacing of inner content
  > p,
  > ul {
    margin-bottom: 0;
  }
  > p + p {
    margin-top: 5px;
  }
41
}
42

43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Dismissable alerts
//
// Expand the right padding and account for the close button's positioning.

.alert-dismissable {
 padding-right: (@alert-padding + 20);

  // Adjust close link position
  .close {
    position: relative;
    top: -2px;
    right: -21px;
    color: inherit;
  }
}

59
// Alternate styles
60
61
//
// Generate contextual modifier classes for colorizing the alert.
62

63
.alert-success {
64
  .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);
65
}
66
.alert-danger {
67
  .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);
68
}
69
.alert-info {
70
  .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);
71
}