element/packages/theme-default/src/message-box.css

150 lines
2.5 KiB
CSS

@charset "UTF-8";
@import "./common/var.css";
@import "./button.css";
@import "./input.css";
@import '../../../node_modules/vue-popup/lib/popup.css';
@component-namespace el {
@b message-box {
position: fixed;
top: 50%;
left: 50%;
transform: translate3d(-50%, -50%, 0);
background-color: #fff;
width: 420px;
border-radius: 3px;
font-size: 16px;
-webkit-user-select: none;
overflow: hidden;
backface-visibility: hidden;
@e header {
padding: 20px 20px 0;
}
@e content {
padding: 30px 20px;
color: #475669;
font-size: 14px;
position: relative;
}
@e close {
display: inline-block;
position: absolute;
top: 19px;
right: 20px;
color: #999;
cursor: pointer;
line-height: 20px;
text-align: center;
&:hover {
color: var(--color-primary);
}
}
@e input {
padding-top: 15px;
& input.invalid {
border-color: #ff4949;
&:focus {
border-color: #ff4949;
}
}
}
@e errormsg {
color: red;
font-size: 12px;
min-height: 18px;
margin-top: 2px;
}
@e title {
padding-left: 0;
margin-bottom: 0;
font-size: 16px;
font-weight: bold;
height: 18px;
color: #333;
}
@e message {
margin: 0;
& p {
margin: 0;
line-height: 1.4;
}
}
@e btns {
padding: 10px 20px 15px;
text-align: right;
& button:nth-child(2) {
margin-left: 10px;
}
}
@e btns-reverse {
flex-direction: row-reverse;
}
@e status {
position: absolute;
top: 50%;
transform: translateY(-50%);
font-size: 36px !important;
&.el-icon-circle-check {
color: #13ce66;
}
&.el-icon-information {
color: #50bfff;
}
&.el-icon-warning {
color: #f7ba2a;
}
&.el-icon-circle-cross {
color: #ff4949;
}
}
}
}
.msgbox-fade-enter-active {
animation: msgbox-fade-in .3s;
}
.msgbox-fade-leave-active {
animation: msgbox-fade-out .3s;
}
@keyframes msgbox-fade-in {
0% {
transform: translate3d(-50%, calc(-50% - 20px), 0);
opacity: 0;
}
100% {
transform: translate3d(-50%, -50%, 0);
opacity: 1;
}
}
@keyframes msgbox-fade-out {
0% {
transform: translate3d(-50%, -50%, 0);
opacity: 1;
}
100% {
transform: translate3d(-50%, calc(-50% - 20px), 0);
opacity: 0;
}
}