toast.scss 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. //@import '../theme/variables.scss';
  2. @import "./variables.scss";
  3. $module: #{$prefix}-toast;
  4. $icon: #{$prefix}-toast-icon;
  5. .#{$module} {
  6. pointer-events: none;
  7. &-wrapper {
  8. pointer-events: none;
  9. position: fixed;
  10. top: $spacing-toast_wrapper-top;
  11. width: $width-toast_wrapper;
  12. text-align: center;
  13. z-index: $z-toast;
  14. }
  15. &-content {
  16. pointer-events: all;
  17. @include shadow-elevated;
  18. @include font-size-regular;
  19. background-color: $color-toast-bg-default;
  20. border-radius: $radius-toast_content;
  21. padding: $spacing-toast_content-paddingY $spacing-toast_content-paddingX;
  22. display: inline-flex;
  23. align-items: flex-start;
  24. justify-content: center;
  25. margin: $spacing-toast_content-margin;
  26. font-weight: $font-toast_content-fontWeight;
  27. color: $color-toast-text-default;
  28. .#{$module}-close-button {
  29. margin-top: $spacing-toast_content_close_btn-marginTop;
  30. height: $width-icon-large;
  31. }
  32. .#{$module}-content-text {
  33. margin-left: $spacing-toast_content_text-marginLeft;
  34. margin-right: $spacing-toast_content_text-marginRight;
  35. text-align: left;
  36. }
  37. }
  38. &-light {
  39. &.#{$module}-warning {
  40. .#{$module}-content {
  41. background-color: $color-toast_warning_light-bg;
  42. border: $width-toast_light-border solid $color-toast_warning_light-border;
  43. }
  44. }
  45. &.#{$module}-success {
  46. .#{$module}-content {
  47. background-color: $color-toast_success_light-bg;
  48. border: $width-toast_light-border solid $color-toast_success_light-border;
  49. }
  50. }
  51. &.#{$module}-info {
  52. .#{$module}-content {
  53. background-color: $color-toast_info_light-bg;
  54. border: $width-toast_light-border solid $color-toast_info_light-border;
  55. }
  56. }
  57. &.#{$module}-error {
  58. .#{$module}-content {
  59. background-color: $color-toast_danger_light-bg;
  60. border: $width-toast_light-border solid $color-toast_danger_light-border;
  61. }
  62. }
  63. }
  64. .#{$icon}-warning {
  65. color: $color-toast_warning-icon;
  66. }
  67. .#{$icon}-success {
  68. color: $color-toast_success-icon;
  69. }
  70. .#{$icon}-info {
  71. color: $color-toast_info-icon;
  72. }
  73. .#{$icon}-error {
  74. color: $color-toast_danger-icon;
  75. }
  76. }
  77. @import "./rtl.scss";