alerts.less 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. //
  2. // Alerts
  3. // --------------------------------------------------
  4. // Base styles
  5. // -------------------------
  6. .alert {
  7. padding: @alert-padding;
  8. margin-bottom: @line-height-computed;
  9. border-left: 3px solid transparent;
  10. border-radius: @alert-border-radius;
  11. // Headings for larger alerts
  12. h4 {
  13. margin-top: 0;
  14. // Specified for the h4 to prevent conflicts of changing @headings-color
  15. color: inherit;
  16. }
  17. // Provide class for links that match alerts
  18. .alert-link {
  19. font-weight: @alert-link-font-weight;
  20. }
  21. // Improve alignment and spacing of inner content
  22. > p,
  23. > ul {
  24. margin-bottom: 0;
  25. }
  26. > p + p {
  27. margin-top: 5px;
  28. }
  29. p:last-child {
  30. margin-bottom: 0;
  31. }
  32. }
  33. // Dismissable alerts
  34. //
  35. // Expand the right padding and account for the close button's positioning.
  36. .alert-dismissable {
  37. padding-right: (@alert-padding + 20);
  38. // Adjust close link position
  39. .close {
  40. position: relative;
  41. top: -2px;
  42. right: -21px;
  43. color: inherit;
  44. }
  45. }
  46. // Alternate styles
  47. //
  48. // Generate contextual modifier classes for colorizing the alert.
  49. .alert-success {
  50. .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);
  51. }
  52. .alert-info {
  53. .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);
  54. }
  55. .alert-warning {
  56. .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);
  57. }
  58. .alert-danger {
  59. .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);
  60. }
  61. .alert-alt {
  62. .alert-variant(@alert-alt-bg; @alert-alt-border; @alert-alt-text);
  63. }
  64. .alert {
  65. a,
  66. .btn-inline-link {
  67. color: white;
  68. text-decoration: underline;
  69. }
  70. .btn {
  71. text-decoration: none;
  72. }
  73. }