amis/packages/amis-ui/scss/components/_status.scss

119 lines
2.3 KiB
SCSS
Raw Normal View History

2019-04-30 11:11:25 +08:00
.#{$ns}StatusField {
2021-06-13 13:02:51 +08:00
vertical-align: middle;
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(--Status-font-size);
margin-left: var(--Status-font-margin);
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(--Status-icon-width);
height: var(--Status-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(--Status-pending-beforeColor);
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(--Status-pending-afterColor);
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(--Status-warning-color);
}
&.icon-fail {
color: var(--Status-fail-color)
}
&.icon-success {
color: var(--Status-success-color)
}
&.icon-schedule {
color: var(--Status-schedule-color)
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(--Status-warning-color);
2019-12-06 09:58:08 +08:00
}
2020-06-09 14:44:38 +08:00
.#{$ns}Status-icon.icon-success + &-label {
color: var(--Status-success-color);
2019-12-06 09:58:08 +08:00
}
2020-06-09 14:44:38 +08:00
.#{$ns}Status-icon.icon-fail + &-label {
color: var(--Status-fail-color);
2019-12-06 09:58:08 +08:00
}
2020-06-09 14:44:38 +08:00
.#{$ns}Status-icon.icon-warning + &-label {
color: var(--Status-warning-color);
}
.#{$ns}Status-icon.icon-schedule + &-label {
color: var(--Status-schedule-color);
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
}