You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.4 KiB

7 months ago
  1. .toast {
  2. // scss-docs-start toast-css-vars
  3. --#{$prefix}toast-zindex: #{$zindex-toast};
  4. --#{$prefix}toast-padding-x: #{$toast-padding-x};
  5. --#{$prefix}toast-padding-y: #{$toast-padding-y};
  6. --#{$prefix}toast-spacing: #{$toast-spacing};
  7. --#{$prefix}toast-max-width: #{$toast-max-width};
  8. @include rfs($toast-font-size, --#{$prefix}toast-font-size);
  9. --#{$prefix}toast-color: #{$toast-color};
  10. --#{$prefix}toast-bg: #{$toast-background-color};
  11. --#{$prefix}toast-border-width: #{$toast-border-width};
  12. --#{$prefix}toast-border-color: #{$toast-border-color};
  13. --#{$prefix}toast-border-radius: #{$toast-border-radius};
  14. --#{$prefix}toast-box-shadow: #{$toast-box-shadow};
  15. --#{$prefix}toast-header-color: #{$toast-header-color};
  16. --#{$prefix}toast-header-bg: #{$toast-header-background-color};
  17. --#{$prefix}toast-header-border-color: #{$toast-header-border-color};
  18. // scss-docs-end toast-css-vars
  19. width: var(--#{$prefix}toast-max-width);
  20. max-width: 100%;
  21. @include font-size(var(--#{$prefix}toast-font-size));
  22. color: var(--#{$prefix}toast-color);
  23. pointer-events: auto;
  24. background-color: var(--#{$prefix}toast-bg);
  25. background-clip: padding-box;
  26. border: var(--#{$prefix}toast-border-width) solid var(--#{$prefix}toast-border-color);
  27. box-shadow: var(--#{$prefix}toast-box-shadow);
  28. @include border-radius(var(--#{$prefix}toast-border-radius));
  29. &.showing {
  30. opacity: 0;
  31. }
  32. &:not(.show) {
  33. display: none;
  34. }
  35. }
  36. .toast-container {
  37. --#{$prefix}toast-zindex: #{$zindex-toast};
  38. position: absolute;
  39. z-index: var(--#{$prefix}toast-zindex);
  40. width: max-content;
  41. max-width: 100%;
  42. pointer-events: none;
  43. > :not(:last-child) {
  44. margin-bottom: var(--#{$prefix}toast-spacing);
  45. }
  46. }
  47. .toast-header {
  48. display: flex;
  49. align-items: center;
  50. padding: var(--#{$prefix}toast-padding-y) var(--#{$prefix}toast-padding-x);
  51. color: var(--#{$prefix}toast-header-color);
  52. background-color: var(--#{$prefix}toast-header-bg);
  53. background-clip: padding-box;
  54. border-bottom: var(--#{$prefix}toast-border-width) solid var(--#{$prefix}toast-header-border-color);
  55. @include border-top-radius(calc(var(--#{$prefix}toast-border-radius) - var(--#{$prefix}toast-border-width)));
  56. .btn-close {
  57. margin-right: calc(-.5 * var(--#{$prefix}toast-padding-x)); // stylelint-disable-line function-disallowed-list
  58. margin-left: var(--#{$prefix}toast-padding-x);
  59. }
  60. }
  61. .toast-body {
  62. padding: var(--#{$prefix}toast-padding-x);
  63. word-wrap: break-word;
  64. }