@use '../_styles/_variables.scss' as *; @use 'sass:color'; $message-prefix: #{$prefix}-message; .#{$message-prefix}-wrapper { position: fixed; z-index: 6000; display: flex; align-items: center; gap: 8px; } .#{$message-prefix} { display: inline-flex; align-items: center; outline: 0; width: fit-content; vertical-align: middle; border-radius: $border-radius; padding: 6px 12px; background-color: $bg-color-container; color: $text-color-base; box-shadow: $shadow-overlay; box-sizing: border-box; &-message { font-size: 14px; line-height: 1; } &-icon { flex-shrink: 0; margin-right: 8px; } &-close { flex-shrink: 0; margin-left: 6px; color: $text-color-assist; cursor: pointer; border-radius: 50%; width: 18px; height: 18px; &:hover { background-color: $default-color-hover; } } &-info { .#{$message-prefix}-icon { color: $primary-color; } } &-success { .#{$message-prefix}-icon { color: $success-color; } } &-warning { .#{$message-prefix}-icon { color: $warning-color; } } &-danger { .#{$message-prefix}-icon { color: $danger-color; } } &-question { .#{$message-prefix}-icon { color: $primary-color; } } &-loading { .#{$message-prefix}-icon { color: $primary-color; } } &-placement { &-top { top: 20px; left: 50%; transform: translateX(-50%); flex-direction: column; align-items: center; } &-bottom { bottom: 20px; left: 50%; transform: translateX(-50%); flex-direction: column-reverse; align-items: center; } &-left { top: 50%; left: 20px; transform: translateY(-50%); flex-direction: column; align-items: flex-start; } &-right { top: 50%; right: 20px; transform: translateY(-50%); flex-direction: column; align-items: flex-end; } // 组合方向 &-top-start { top: 20px; left: 20px; flex-direction: column; align-items: flex-start; } &-top-end { top: 20px; right: 20px; flex-direction: column; align-items: flex-end; } &-bottom-start { bottom: 20px; left: 20px; flex-direction: column-reverse; align-items: flex-start; } &-bottom-end { bottom: 20px; right: 20px; flex-direction: column-reverse; align-items: flex-end; } &-center { top: 50%; left: 50%; transform: translate(-50%, -50%); flex-direction: column; align-items: center; } } } .#{$message-prefix}-theme-normal.#{$message-prefix} { background-color: $status-base-bg-color; } .#{$message-prefix}-theme-light.#{$message-prefix}-default { background-color: $status-base-bg-color; } .#{$message-prefix}-theme-light.#{$message-prefix}-info { background-color: $status-info-bg-color; } .#{$message-prefix}-theme-light.#{$message-prefix}-success { background-color: $status-success-bg-color; } .#{$message-prefix}-theme-light.#{$message-prefix}-warning { background-color: $status-warning-bg-color; } .#{$message-prefix}-theme-light.#{$message-prefix}-danger { background-color: $status-danger-bg-color; } .#{$message-prefix}-theme-light.#{$message-prefix}-loading { background-color: $status-info-bg-color; } .#{$message-prefix}-theme-light.#{$message-prefix}-question { background-color: $status-info-bg-color; }