_alerts.scss 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. .alert {
  2. --#{$prefix}alert-color: #{var(--#{$prefix}secondary)};
  3. --#{$prefix}alert-bg: #{var(--#{$prefix}bg-surface)};
  4. border: $alert-border-width var(--#{$prefix}border-style) $alert-border-color;
  5. border-left: .25rem var(--#{$prefix}border-style) var(--#{$prefix}alert-color);
  6. box-shadow: $alert-shadow;
  7. >:last-child {
  8. margin-bottom: 0;
  9. }
  10. }
  11. .alert-important {
  12. border-color: transparent;
  13. background: var(--#{$prefix}alert-color);
  14. color: #fff;
  15. .alert-icon,
  16. .alert-link,
  17. .alert-title {
  18. color: inherit;
  19. }
  20. .alert-link:hover {
  21. color: inherit;
  22. }
  23. .btn-close {
  24. filter: var(--#{$prefix}btn-close-white-filter);
  25. }
  26. }
  27. .alert-link, {
  28. &,
  29. &:hover {
  30. color: var(--#{$prefix}alert-color);
  31. }
  32. }
  33. @each $name, $color in $theme-colors {
  34. .alert-#{$name} {
  35. --#{$prefix}alert-color: var(--#{$prefix}#{$name});
  36. }
  37. }
  38. .alert-icon {
  39. color: var(--#{$prefix}alert-color);
  40. width: 1.5rem !important;
  41. height: 1.5rem !important;
  42. margin: -.125rem $alert-padding-x -.125rem 0;
  43. }
  44. .alert-title {
  45. font-size: $h4-font-size;
  46. line-height: $h4-line-height;
  47. font-weight: var(--#{$prefix}font-weight-bold);
  48. margin-bottom: .25rem;
  49. color: var(--#{$prefix}alert-color);
  50. }