amis2/scss/components/_status.scss

102 lines
1.8 KiB
SCSS
Raw Normal View History

2019-04-30 11:11:25 +08:00
.#{$ns}StatusField {
2019-12-06 09:58:08 +08:00
white-space: nowrap;
2020-06-09 14:44:38 +08:00
display: inline-flex;
flex-wrap: nowrap;
flex-direction: row;
align-items: center;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-label {
font-size: var(--fontSizeSm);
margin-left: var(--gap-sm);
2019-12-06 09:58:08 +08:00
}
2019-12-06 09:58:08 +08:00
@keyframes animation-rolling_red {
0% {
2020-06-09 14:44:38 +08:00
transform: translateX(0);
2019-12-06 09:58:08 +08:00
}
2019-12-06 09:58:08 +08:00
50% {
2020-06-09 14:44:38 +08:00
transform: translateX(20px);
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
100% {
2020-06-09 14:44:38 +08:00
transform: translateX(0);
2019-12-06 09:58:08 +08:00
}
}
2019-12-06 09:58:08 +08:00
@keyframes animation-rolling_blue {
0% {
2020-06-09 14:44:38 +08:00
transform: translateX(0);
2019-12-06 09:58:08 +08:00
}
2019-12-06 09:58:08 +08:00
50% {
2020-06-09 14:44:38 +08:00
transform: translateX(-20px);
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
100% {
2020-06-09 14:44:38 +08:00
transform: translateX(0);
2019-12-06 09:58:08 +08:00
}
}
2020-06-08 16:53:52 +08:00
svg.#{$ns}Status-icon {
width: var(--Satus-icon-width);
height: var(--Satus-icon-height);
2020-06-09 14:44:38 +08:00
top: 0;
2020-06-08 16:53:52 +08:00
}
2019-12-06 09:58:08 +08:00
.#{$ns}Status-icon {
2020-06-09 14:44:38 +08:00
&.rolling {
width: 30px;
height: 10px;
display: inline-block;
vertical-align: middle;
2019-12-06 09:58:08 +08:00
position: relative;
&::before {
2020-06-09 14:44:38 +08:00
content: '';
display: inline-block;
border: 5px solid var(--danger);
2020-06-09 14:44:38 +08:00
border-radius: 500px;
2019-12-06 09:58:08 +08:00
position: absolute;
2020-06-09 14:44:38 +08:00
top: 0;
2019-12-06 09:58:08 +08:00
left: 0;
animation: animation-rolling_red 2s;
animation-iteration-count: infinite;
}
&::after {
2020-06-09 14:44:38 +08:00
content: '';
display: inline-block;
border: 5px solid var(--primary);
2020-06-09 14:44:38 +08:00
border-radius: 500px;
2019-12-06 09:58:08 +08:00
position: absolute;
2020-06-09 14:44:38 +08:00
top: 0;
left: 20px;
2019-12-06 09:58:08 +08:00
animation: animation-rolling_blue 2s;
animation-iteration-count: infinite;
}
2019-04-30 11:11:25 +08:00
}
2020-06-09 14:44:38 +08:00
&.icon-warning {
color: var(--warning);
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2020-06-09 14:44:38 +08:00
.#{$ns}Status-icon.rolling + &-label {
color: var(--warning);
2019-12-06 09:58:08 +08:00
}
2020-06-09 14:44:38 +08:00
.#{$ns}Status-icon.icon-success + &-label {
color: var(--success);
2019-12-06 09:58:08 +08:00
}
2020-06-09 14:44:38 +08:00
.#{$ns}Status-icon.icon-fail + &-label {
color: var(--danger);
2019-12-06 09:58:08 +08:00
}
2020-06-09 14:44:38 +08:00
.#{$ns}Status-icon.icon-warning + &-label {
color: var(--warning);
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
}