2015-10-27 14:01:55 +08:00
|
|
|
@spin-prefix-cls: ant-spin;
|
2015-12-02 11:53:37 +08:00
|
|
|
@spin-dot-default : #999;
|
|
|
|
@spin-dot-size : 8px;
|
|
|
|
@spin-dot-size-sm : @spin-dot-size / 2;
|
|
|
|
@spin-dot-size-lg : @spin-dot-size * 2;
|
2015-10-27 14:01:55 +08:00
|
|
|
|
2015-10-27 10:10:27 +08:00
|
|
|
// root of component
|
|
|
|
// ------------------------------
|
|
|
|
|
2015-10-27 14:01:55 +08:00
|
|
|
.@{spin-prefix-cls} {
|
2015-10-28 19:33:25 +08:00
|
|
|
color: @primary-color;
|
2015-10-30 11:56:23 +08:00
|
|
|
display: inline-block;
|
2016-02-21 14:40:19 +08:00
|
|
|
vertical-align: middle;
|
2015-10-27 14:01:55 +08:00
|
|
|
text-align: center;
|
2015-11-06 23:43:23 +08:00
|
|
|
opacity: 0;
|
|
|
|
position: absolute;
|
2015-11-06 23:49:37 +08:00
|
|
|
visibility: hidden;
|
2015-11-06 23:43:23 +08:00
|
|
|
transition: opacity 0.3s @ease-in-out-circ;
|
2016-02-21 14:40:19 +08:00
|
|
|
font-size: @font-size-base;
|
2015-11-06 23:43:23 +08:00
|
|
|
|
|
|
|
&-spining {
|
|
|
|
opacity: 1;
|
|
|
|
position: static;
|
2015-11-06 23:49:37 +08:00
|
|
|
visibility: visible;
|
2015-11-06 23:43:23 +08:00
|
|
|
}
|
2015-10-27 10:10:27 +08:00
|
|
|
|
2015-10-28 19:33:25 +08:00
|
|
|
&-nested-loading {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
2015-10-31 02:00:03 +08:00
|
|
|
&-nested-loading & {
|
2015-10-28 19:33:25 +08:00
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
left: 50%;
|
2016-02-21 14:40:19 +08:00
|
|
|
height: 20px;
|
|
|
|
line-height: 20px;
|
|
|
|
margin-top: -10px;
|
|
|
|
margin-left: -2.5 * @spin-dot-size;
|
2015-10-28 19:33:25 +08:00
|
|
|
z-index: 4;
|
|
|
|
}
|
|
|
|
|
2015-10-31 02:00:03 +08:00
|
|
|
&-container {
|
2015-11-06 23:43:23 +08:00
|
|
|
transition: all 0.3s @ease-in-out-circ;
|
2015-10-31 02:00:03 +08:00
|
|
|
}
|
|
|
|
|
2015-10-28 19:33:25 +08:00
|
|
|
&-nested-loading > &-container {
|
2015-10-31 02:00:03 +08:00
|
|
|
opacity: 0.7;
|
2016-02-21 14:40:19 +08:00
|
|
|
-webkit-filter: blur(1px);
|
2015-10-31 02:00:03 +08:00
|
|
|
filter: blur(1px);
|
2016-02-05 00:41:41 +08:00
|
|
|
filter: ~"progid\:DXImageTransform\.Microsoft\.Blur(PixelRadius\=1, MakeShadow\=false)"; /* IE6~IE9 */
|
2015-11-03 22:23:31 +08:00
|
|
|
pointer-events: none;
|
2015-10-28 19:33:25 +08:00
|
|
|
}
|
|
|
|
|
2015-10-27 14:01:55 +08:00
|
|
|
// dots
|
|
|
|
// ------------------------------
|
2015-10-27 14:58:04 +08:00
|
|
|
|
2015-10-27 14:01:55 +08:00
|
|
|
&-dot {
|
2015-11-03 22:41:57 +08:00
|
|
|
.animation(antSpinPulse 1.2s infinite @ease-in-out-circ);
|
2016-02-20 16:58:29 +08:00
|
|
|
.square(@spin-dot-size);
|
2015-10-27 14:01:55 +08:00
|
|
|
border-radius: 50%;
|
|
|
|
display: inline-block;
|
2015-10-27 14:58:04 +08:00
|
|
|
background-color: @primary-color;
|
2015-10-27 14:01:55 +08:00
|
|
|
}
|
|
|
|
&-dot-second {
|
|
|
|
.animation-delay(200ms);
|
|
|
|
}
|
|
|
|
&-dot-third {
|
|
|
|
.animation-delay(400ms);
|
2016-02-20 16:58:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-dot + &-dot {
|
|
|
|
margin-left: @spin-dot-size;
|
2015-10-27 14:01:55 +08:00
|
|
|
}
|
2015-10-27 10:10:27 +08:00
|
|
|
|
2015-10-27 14:01:55 +08:00
|
|
|
// Sizes
|
|
|
|
// ------------------------------
|
|
|
|
// small
|
2016-02-20 16:58:29 +08:00
|
|
|
&-sm &-dot {
|
|
|
|
.square(@spin-dot-size-sm);
|
|
|
|
+ & {
|
|
|
|
margin-left: @spin-dot-size-sm;
|
|
|
|
}
|
2015-10-27 14:01:55 +08:00
|
|
|
}
|
2015-10-27 10:10:27 +08:00
|
|
|
|
2016-02-21 14:40:19 +08:00
|
|
|
&-nested-loading &-sm {
|
|
|
|
margin-left: -2.5 * @spin-dot-size-sm;
|
|
|
|
}
|
|
|
|
|
2015-10-27 14:01:55 +08:00
|
|
|
// large
|
2016-02-20 16:58:29 +08:00
|
|
|
&-lg &-dot {
|
|
|
|
.square(@spin-dot-size-lg);
|
|
|
|
+ & {
|
|
|
|
margin-left: @spin-dot-size-lg;
|
|
|
|
}
|
2015-10-27 14:01:55 +08:00
|
|
|
}
|
2016-02-21 14:40:19 +08:00
|
|
|
|
|
|
|
&-nested-loading &-sm {
|
|
|
|
margin-left: -2.5 * @spin-dot-size-lg;
|
|
|
|
}
|
2015-10-27 10:10:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// pulse
|
2015-10-27 14:01:55 +08:00
|
|
|
@keyframes antSpinPulse {
|
2015-11-26 19:32:55 +08:00
|
|
|
0%,
|
|
|
|
80%,
|
|
|
|
100% {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
40% {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
2015-10-27 10:10:27 +08:00
|
|
|
}
|
2015-10-28 19:33:25 +08:00
|
|
|
|
|
|
|
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
|
|
|
/* IE10+*/
|
|
|
|
.ant-spin-nested-loading > .ant-spin-container {
|
|
|
|
background: #fff;
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
|
|
|
}
|