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


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

9
10
.alert {
  padding: 8px 35px 8px 14px;
11
  margin-bottom: @line-height-base;
12
  color: @state-warning-text;
13
  background-color: @state-warning-bg;
Mark Otto's avatar
Mark Otto committed
14
  border: 1px solid @state-warning-border;
15
  border-radius: @border-radius-base;
16
17
18
19
20
21
22
23
24
25
26

  // 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 {
    border-top-color: darken(@state-warning-border, 5%);
  }
27
28
29
30
31
32
  // Inherit color for immediate links and bolden them some
  > a,
  > p > a {
    font-weight: 500;
    color: darken(@state-warning-text, 10%);
  }
Mark Otto's avatar
Mark Otto committed
33
}
34

35
// Adjust close link position
36
.close {
37
  position: relative;
Mark Otto's avatar
Mark Otto committed
38
  top: -2px;
39
  right: -21px;
40
  line-height: @line-height-base;
41
  color: inherit;
42
}
43

44
// Alternate styles
45
// -------------------------
46

47
.alert-success {
48
  background-color: @state-success-bg;
Mark Otto's avatar
Mark Otto committed
49
50
  border-color: @state-success-border;
  color: @state-success-text;
51
52
53
  hr {
    border-top-color: darken(@state-success-border, 5%);
  }
54
55
56
57
  > a,
  > p > a {
    color: darken(@state-success-text, 10%);
  }
58
}
59
60
.alert-danger,
.alert-error {
61
  background-color: @state-danger-bg;
62
63
  border-color: @state-danger-border;
  color: @state-danger-text;
64
  hr {
65
    border-top-color: darken(@state-danger-border, 5%);
66
  }
67
68
  > a,
  > p > a {
69
    color: darken(@state-danger-text, 10%);
70
  }
71
}
72
.alert-info {
73
  background-color: @state-info-bg;
Mark Otto's avatar
Mark Otto committed
74
75
  border-color: @state-info-border;
  color: @state-info-text;
76
77
78
  hr {
    border-top-color: darken(@state-info-border, 5%);
  }
79
80
81
82
  > a,
  > p > a {
    color: darken(@state-info-text, 10%);
  }
83
}
84

85
// Block alerts
86
87
// -------------------------

88
.alert-block {
89
90
91
  padding-top: 14px;
  padding-bottom: 14px;
}
92
93
.alert-block > p,
.alert-block > ul {
94
  margin-bottom: 0;
95
}
96
.alert-block p + p {
97
  margin-top: 5px;
98
}