UNPKG

@perfma/heaven

Version:

An UI Framework base [Ant Design V4](https://ant.design/components/overview-cn/) for React.

107 lines (90 loc) 1.72 kB
@toastPrefixCls: heaven-toast; .@{toastPrefixCls} { position: fixed; width: 100%; z-index: 100000; font-size: 12px; text-align: center; > span { max-width: 50%; } &&-mask { height: 100%; display: flex; justify-content: center; align-items: center; left: 0; top: 0; transform: translateZ(1px); } &&-nomask { position: fixed; max-width: 50%; width: auto; left: 50%; top: 50%; transform: translateZ(1px); .@{toastPrefixCls}-notice { transform: translateX(-50%) translateY(-50%); } } &-notice-content { min-width: 120px; .@{toastPrefixCls}-text { border-radius: 4px; color: #fff; background: rgba(26, 26, 26, 0.95); padding: 16px 24px; word-break: break-all; } .@{toastPrefixCls}-text, .@{toastPrefixCls}-text-info { * { margin: 0; word-break: break-all; } } } } .heaven { .effect() { animation-duration: 0.2s; animation-fill-mode: both; animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2); } &-fade-enter, &-fade-appear { opacity: 0; .effect(); animation-play-state: paused; } &-fade-leave { .effect(); animation-play-state: paused; } &-fade-enter&-fade-enter-active, &-fade-appear&-fade-appear-active { animation-name: amFadeIn; animation-play-state: running; } &-fade-leave&-fade-leave-active { animation-name: amFadeOut; animation-play-state: running; } @keyframes amFadeIn { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes amFadeOut { 0% { opacity: 1; } 100% { opacity: 0; } } }