choerodon-ui
Version:
An enterprise-class UI design language and React-based implementation
88 lines (74 loc) • 1.65 kB
text/less
@import '../../style/themes/default';
@import '../../style/mixins/index';
@message-prefix-cls: ~'@{c7n-prefix}-message';
.@{message-prefix-cls} {
.reset-component;
position: fixed;
top: 0;
left: 0;
z-index: @zindex-message;
pointer-events: none;
&-notice {
padding: 0.08rem;
text-align: center;
&:first-child {
margin-top: -0.08rem;
}
}
&-notice-content {
display: inline-block;
padding: 0.1rem 0.16rem;
background: @component-background;
border-radius: @border-radius-base;
box-shadow: @shadow-2;
pointer-events: all;
}
&-success .@{iconfont-css-prefix} {
color: @success-color;
}
&-error .@{iconfont-css-prefix} {
color: @error-color;
}
&-warning .@{iconfont-css-prefix} {
color: @warning-color;
}
&-info .@{iconfont-css-prefix},
&-loading .@{c7n-prefix}-progress-loading {
color: @info-color;
}
&-loading .@{c7n-prefix}-progress-loading {
position: relative;
top: -0.01rem;
margin-right: 0.08rem;
font-size: @font-size-lg;
line-height: 1;
.@{c7n-prefix}-progress-inner {
width: 0.16rem;
height: 0.16rem;
}
}
.@{iconfont-css-prefix} {
position: relative;
top: 0.01rem;
margin-right: 0.08rem;
font-size: @font-size-lg;
vertical-align: top;
}
&-notice.move-up-leave.move-up-leave-active {
overflow: hidden;
animation-name: MessageMoveOut;
animation-duration: @animation-duration-slow;
}
}
@keyframes MessageMoveOut {
0% {
max-height: 1.5rem;
padding: 0.08rem;
opacity: 1;
}
100% {
max-height: 0;
padding: 0;
opacity: 0;
}
}