ant-design/style/components/spin.less

65 lines
1.1 KiB
Plaintext
Raw Normal View History

2015-10-27 10:10:27 +08:00
@import "../mixins/index";
2015-10-27 14:01:55 +08:00
@spin-prefix-cls: ant-spin;
2015-10-27 10:10:27 +08:00
// root of component
// ------------------------------
2015-10-27 14:01:55 +08:00
.@{spin-prefix-cls} {
display: inline-block;
font-size: @spin-dot-size;
height: @spin-dot-size;
position: relative;
text-align: center;
vertical-align: middle;
2015-10-27 10:10:27 +08:00
2015-10-27 14:01:55 +08:00
// dots
// ------------------------------
&-dot {
.animation(antSpinPulse 1s infinite ease-in-out);
.square(1em);
border-radius: 50%;
display: inline-block;
vertical-align: top;
}
&-dot-second {
.animation-delay(200ms);
margin-left: 1em;
}
&-dot-third {
.animation-delay(400ms);
margin-left: 1em;
}
2015-10-27 10:10:27 +08:00
2015-10-27 14:01:55 +08:00
// Types
// ------------------------------
2015-10-27 10:10:27 +08:00
2015-10-27 14:01:55 +08:00
// default
&-default > &-dot { background-color: @spin-dot-default; }
2015-10-27 10:10:27 +08:00
2015-10-27 14:01:55 +08:00
// primary
&-primary > &-dot { background-color: @primary-color; }
2015-10-27 10:10:27 +08:00
2015-10-27 14:01:55 +08:00
// Sizes
// ------------------------------
2015-10-27 10:10:27 +08:00
2015-10-27 14:01:55 +08:00
// small
&-sm {
font-size: @spin-dot-size-sm;
height: @spin-dot-size-sm;
}
2015-10-27 10:10:27 +08:00
2015-10-27 14:01:55 +08:00
// large
&-lg {
font-size: @spin-dot-size-lg;
height: @spin-dot-size-lg;
}
2015-10-27 10:10:27 +08:00
}
// pulse
2015-10-27 14:01:55 +08:00
@keyframes antSpinPulse {
0%, 80%, 100% { opacity: 0; }
40% { opacity: 1; }
2015-10-27 10:10:27 +08:00
}