_alert.less 1.4 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;
12
  border: 1px solid transparent;
13
  .border-radius(@alert-border-radius);
14
15
16
17

  // Headings for larger alerts
  h4 {
    margin-top: 0;
18
    // Specified for the h4 to prevent conflicts of changing @headings-color
19
20
    color: inherit;
  }
Mark Otto's avatar
Mark Otto committed
21
22
  // Provide class for links that match alerts
  .alert-link {
syed's avatar
syed committed
23
    font-weight: @alert-link-font-weight;
24
  }
25

26
27
28
29
30
31
32
33
  // Improve alignment and spacing of inner content
  > p,
  > ul {
    margin-bottom: 0;
  }
  > p + p {
    margin-top: 5px;
  }
34
}
35

Bas Bosman's avatar
Bas Bosman committed
36
// Dismissible alerts
37
38
39
//
// Expand the right padding and account for the close button's positioning.

Bas Bosman's avatar
Bas Bosman committed
40
.alert-dismissible {
Nick Schonning's avatar
Nick Schonning committed
41
  padding-right: (@alert-padding + 20);
42
43
44
45
46
47
48
49
50
51

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

52
// Alternate styles
53
54
//
// Generate contextual modifier classes for colorizing the alert.
55

56
.alert-success {
57
  .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);
58
}
59
.alert-info {
60
  .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);
61
}
62
63
64
65
66
67
.alert-warning {
  .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);
}
.alert-danger {
  .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);
}