naive-ui/styles/Message.scss

84 lines
2.1 KiB
SCSS
Raw Normal View History

2019-06-19 17:43:57 +08:00
@import './mixins/mixins.scss';
@import './theme/default.scss';
@include b(message) {
&.n-message__container {
.n-message__cell {
2019-06-28 15:38:44 +08:00
display: flex;
transition: opacity .3s $default-cubic-bezier, transform .3s $default-cubic-bezier, max-height .3s $default-cubic-bezier, margin-bottom .3s $default-cubic-bezier;
max-height: 40px;
opacity: 1;
margin-bottom: 12px;
padding: 0 40px;
height: 40px;
border-radius: 20px;
background-color: red;
flex-shrink: 0;
font-weight: 700;
box-shadow:0px 2px 30px 0px rgba(255,255,255,0.22);
color: #ffffff;
overflow: hidden;
.n-message-cell__content {
display: inline-block;
height: 40px;
line-height: 40px;
2019-06-19 17:43:57 +08:00
}
2019-06-28 15:38:44 +08:00
.n-message-cell__icon {
margin-right: 10px;
2019-06-28 15:38:44 +08:00
display: inline-flex;
2019-06-19 17:43:57 +08:00
height: 40px;
2019-06-28 15:38:44 +08:00
line-height: 40px;
align-items: center;
i::before {
font-size: 20px;
2019-06-19 17:43:57 +08:00
}
2019-06-28 15:38:44 +08:00
}
&.n-message__cell--info {
background-color: rgba(56, 137, 197, 1);
.n-message-cell__icon {
i::before {
color: rgba(129, 202, 255, 1);
}
}
}
2019-06-28 15:38:44 +08:00
&.n-message__cell--success {
background-color: #2A947DFF;
2019-06-19 17:43:57 +08:00
.n-message-cell__icon {
i::before {
2019-06-28 15:38:44 +08:00
color: #63E2B7FF
2019-06-19 17:43:57 +08:00
}
}
2019-06-28 15:38:44 +08:00
}
&.n-message__cell--error {
background-color: #D03A52FF;
.n-message-cell__icon {
i::before {
color: #FF92A4FF
2019-06-19 17:43:57 +08:00
}
}
}
&.n-message__cell--warning {
background-color: rgba(255, 138, 0, 1);
.n-message-cell__icon {
i::before {
color: rgba(255, 255, 255, .65);
}
}
}
2019-06-28 15:38:44 +08:00
&.is-going-to-emerge {
opacity: 0;
2019-08-20 17:27:08 +08:00
transform: translateY(-12px) scale(.5);
transform-origin: top center;
2019-06-28 15:38:44 +08:00
max-height: 0px;
margin-bottom: 0;
}
2019-06-19 17:43:57 +08:00
&.is-vanishing {
opacity: 0;
2019-08-20 17:27:08 +08:00
transform-origin: top center;
transform: translateY(-12px) scale(.5);
2019-06-19 17:43:57 +08:00
max-height: 0px;
margin-bottom: 0;
}
}
}
}