UNPKG

antdv-eoi

Version:

An enterprise-class UI design language and Vue-based implementation

191 lines (163 loc) 4.11 kB
@import '../../style/themes/index'; @import '../../style/mixins/index'; @alert-prefix-cls: ~'@{ant-prefix}-alert'; @alert-message-color: var(--color-neutrals-9); @alert-text-color: @text-color; @alert-close-color: @text-color; @alert-close-hover-color: var(--color-neutrals-8); @alert-with-description-icon-size: 24px; @alert-with-description-no-icon-padding-vertical: @padding-md - 1px; @alert-with-description-padding-vertical: @padding-md - 1px; @alert-with-description-padding: @alert-with-description-padding-vertical 15px; .@{alert-prefix-cls} { .reset-component(); position: relative; display: flex; align-items: center; padding: 8px 15px; word-wrap: break-word; border-radius: @border-radius-base; &-content { flex: 1; min-width: 0; } &-icon { margin-right: @margin-xs; } &-description { display: none; font-size: @font-size-base; line-height: @font-size-base + 8px; } &-success { background-color: var(--color-success-alpha); border: @border-width-base @border-style-base var(--color-success-standard); .@{alert-prefix-cls}-icon { color: var(--color-success-standard); } } &-info { background-color: var(--color-ready-alpha); border: @border-width-base @border-style-base var(--color-ready-standard); .@{alert-prefix-cls}-icon { color: var(--color-ready-standard); } } &-warning { background-color: var(--color-warning-alpha); border: @border-width-base @border-style-base var(--color-warning-standard); .@{alert-prefix-cls}-icon { color: var(--color-warning-standard); } } &-error { background-color: var(--color-danger-alpha); border: @border-width-base @border-style-base var(--color-danger-standard); .@{alert-prefix-cls}-icon { color: var(--color-danger-standard); } } &-close-icon { margin-left: @margin-xs; padding: 0; overflow: hidden; font-size: @font-size-sm; line-height: @font-size-sm; background-color: transparent; border: none; outline: none; cursor: pointer; .@{iconfont-css-prefix}-close { color: @alert-close-color; transition: color 0.3s; &:hover { color: @alert-close-hover-color; } } } &-close-text { color: @alert-close-color; transition: color 0.3s; &:hover { color: @alert-close-hover-color; } } &-with-description { align-items: flex-start; position: relative; padding: 8px 8px 8px 56px; color: @alert-text-color; line-height: @line-height-base; border-radius: @border-radius-base; } &-with-description&-no-icon { padding: @alert-with-description-no-icon-padding-vertical 15px; } &-with-description &-icon { margin-right: @alert-with-description-padding-vertical; font-size: @alert-with-description-icon-size; position: absolute; top: 16px; left: 16px; } &-with-description &-close-icon { position: absolute; top: 16px; right: 16px; font-size: @font-size-base; cursor: pointer; } &-with-description &-message { display: block; color: @alert-message-color; font-size: @font-size-lg; line-height: 24px; } &-message { color: @alert-message-color; } &-with-description &-description { display: block; } &&-closing { height: 0 !important; margin: 0; padding-top: 0; padding-bottom: 0; transform-origin: 50% 0; transition: all 0.3s @ease-in-out-circ; } &-slide-up-leave { animation: antAlertSlideUpOut 0.3s @ease-in-out-circ; animation-fill-mode: both; } &-banner { margin-bottom: 0; border: 0; border-radius: 0; } } @keyframes antAlertSlideUpIn { 0% { transform: scaleY(0); transform-origin: 0% 0%; opacity: 0; } 100% { transform: scaleY(1); transform-origin: 0% 0%; opacity: 1; } } @keyframes antAlertSlideUpOut { 0% { transform: scaleY(1); transform-origin: 0% 0%; opacity: 1; } 100% { transform: scaleY(0); transform-origin: 0% 0%; opacity: 0; } }