_toasts.less 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. .toast {
  2. // Prevents from shrinking in IE11, when in a flex container
  3. // See https://github.com/twbs/bootstrap/issues/28341
  4. flex-basis: @toast-max-width;
  5. max-width: @toast-max-width;
  6. #font-size(@toast-font-size);
  7. // LESS PORT: Less doesn’t strip “empty” property values so we have to check for a value first.
  8. & when not (@toast-color = ~"") { color: @toast-color; }
  9. background-color: @toast-background-color;
  10. background-clip: padding-box;
  11. border: @toast-border-width solid @toast-border-color;
  12. box-shadow: @toast-box-shadow;
  13. opacity: 0;
  14. #border-radius(@toast-border-radius);
  15. &:not(:last-child) {
  16. margin-bottom: @toast-padding-x;
  17. }
  18. &.showing {
  19. opacity: 1;
  20. }
  21. &.show {
  22. display: block;
  23. opacity: 1;
  24. }
  25. &.hide {
  26. display: none;
  27. }
  28. }
  29. .toast-header {
  30. display: flex;
  31. align-items: center;
  32. padding: @toast-padding-y @toast-padding-x;
  33. color: @toast-header-color;
  34. background-color: @toast-header-background-color;
  35. background-clip: padding-box;
  36. border-bottom: @toast-border-width solid @toast-header-border-color;
  37. #border-top-radius(subtract(@toast-border-radius, @toast-border-width));
  38. }
  39. .toast-body {
  40. padding: @toast-padding-x; // apply to both vertical and horizontal
  41. }