ant-design/style/components/spin.less

103 lines
1.7 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} {
color: @primary-color;
display: inline-block;
font-size: 1em;
2015-10-27 14:01:55 +08:00
text-align: center;
opacity: 0;
position: absolute;
2015-11-06 23:49:37 +08:00
visibility: hidden;
transition: opacity 0.3s @ease-in-out-circ;
&-spining {
opacity: 1;
position: static;
2015-11-06 23:49:37 +08:00
visibility: visible;
}
2015-10-27 10:10:27 +08:00
&-nested-loading {
position: relative;
}
2015-10-31 02:00:03 +08:00
&-nested-loading & {
position: absolute;
top: 50%;
left: 50%;
margin-top: -0.75em;
margin-left: -2.5em;
z-index: 4;
}
2015-10-31 02:00:03 +08:00
&-container {
transition: all 0.3s @ease-in-out-circ;
2015-10-31 02:00:03 +08:00
}
&-nested-loading > &-container {
2015-10-31 02:00:03 +08:00
opacity: 0.7;
filter: blur(1px);
filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius=1, MakeShadow=false); /* IE6~IE9 */
2015-11-03 22:23:31 +08:00
pointer-events: none;
}
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);
2015-10-27 14:01:55 +08:00
.square(1em);
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);
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
// Sizes
// ------------------------------
2015-10-31 02:00:03 +08:00
&-default {
font-size: @spin-dot-size;
}
2015-10-27 10:10:27 +08:00
2015-10-27 14:01:55 +08:00
// small
2015-10-31 02:00:03 +08:00
&-small {
2015-10-27 14:01:55 +08:00
font-size: @spin-dot-size-sm;
}
2015-10-27 10:10:27 +08:00
2015-10-27 14:01:55 +08:00
// large
2015-10-31 02:00:03 +08:00
&-large {
2015-10-27 14:01:55 +08:00
font-size: @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
}
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
/* IE10+*/
.ant-spin-nested-loading > .ant-spin-container {
background: #fff;
opacity: 0.5;
}
}