ant-design/components/message/style/index.less

76 lines
1.3 KiB
Plaintext
Raw Normal View History

2018-12-07 16:17:45 +08:00
@import '../../style/themes/default';
@import '../../style/mixins/index';
2018-12-07 16:17:45 +08:00
@message-prefix-cls: ~'@{ant-prefix}-message';
2015-08-20 16:55:42 +08:00
.@{message-prefix-cls} {
.reset-component;
2019-04-15 10:52:00 +08:00
position: fixed;
2015-07-11 18:22:35 +08:00
top: 16px;
2016-02-22 19:25:10 +08:00
left: 0;
z-index: @zindex-message;
width: 100%;
pointer-events: none;
&-notice {
padding: 8px;
text-align: center;
&:first-child {
margin-top: -8px;
}
}
2015-07-11 18:00:58 +08:00
&-notice-content {
display: inline-block;
padding: @message-notice-content-padding;
background: @component-background;
2015-07-11 18:00:58 +08:00
border-radius: @border-radius-base;
2016-04-17 18:19:22 +08:00
box-shadow: @shadow-2;
pointer-events: all;
}
&-success .@{iconfont-css-prefix} {
2015-07-11 18:00:58 +08:00
color: @success-color;
}
&-error .@{iconfont-css-prefix} {
2015-07-11 18:00:58 +08:00
color: @error-color;
}
&-warning .@{iconfont-css-prefix} {
color: @warning-color;
}
&-info .@{iconfont-css-prefix},
&-loading .@{iconfont-css-prefix} {
color: @info-color;
}
.@{iconfont-css-prefix} {
position: relative;
top: 1px;
margin-right: 8px;
2016-11-08 21:07:01 +08:00
font-size: @font-size-lg;
}
&-notice.move-up-leave.move-up-leave-active {
overflow: hidden;
animation-name: MessageMoveOut;
2018-12-07 16:17:45 +08:00
animation-duration: 0.3s;
}
}
@keyframes MessageMoveOut {
0% {
max-height: 150px;
padding: 8px;
opacity: 1;
}
100% {
max-height: 0;
padding: 0;
opacity: 0;
}
}