naive-ui/styles/BaseLoading.scss

51 lines
1.2 KiB
SCSS
Raw Normal View History

2019-10-15 17:40:21 +08:00
@import './mixins/mixins.scss';
2020-02-11 14:44:29 +08:00
2019-10-15 18:01:18 +08:00
@keyframes n-base-loading-rotate {
2020-01-31 21:27:37 +08:00
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(270deg);
2019-10-15 17:40:21 +08:00
}
}
2019-10-15 18:01:18 +08:00
@keyframes n-base-loading-dash {
2019-10-15 17:40:21 +08:00
0% {
2020-02-24 16:25:02 +08:00
stroke-dashoffset: $--n-base-loading-stroke-dashoffset;
2019-10-15 17:40:21 +08:00
}
50% {
2020-02-24 16:25:02 +08:00
stroke-dashoffset: $--n-base-loading-stroke-dashoffset / 4;
2020-01-31 21:27:37 +08:00
transform: rotate(135deg);
2019-10-15 17:40:21 +08:00
}
2020-01-31 21:27:37 +08:00
100% {
2020-02-24 16:25:02 +08:00
stroke-dashoffset: $--n-base-loading-stroke-dashoffset;
2020-01-31 21:27:37 +08:00
transform: rotate(450deg);
2019-10-15 17:40:21 +08:00
}
}
2020-01-31 21:27:37 +08:00
2019-10-15 17:40:21 +08:00
@include themes-mixin {
@include b(base-loading) {
@include once {
line-height: 1;
}
2020-02-24 16:25:02 +08:00
stroke: $--base-loading-stroke;
transition: stroke .3s $--n-ease-in-out-cubic-bezier;
2019-10-15 17:40:21 +08:00
@include b(base-loading-circular) {
@include once {
height: 100%;
width: 100%;
2020-01-31 21:27:37 +08:00
animation: n-base-loading-rotate 1.5s linear infinite;
transform-origin: center;
2019-10-15 17:40:21 +08:00
}
@include b(base-loading-circular-path) {
@include once {
2020-01-31 21:27:37 +08:00
transform-origin: center;
2019-10-15 18:01:18 +08:00
animation: n-base-loading-dash 1.5s ease-in-out infinite;
2020-02-24 16:25:02 +08:00
stroke-dasharray: $--n-base-loading-stroke-dashoffset;
2019-10-15 17:40:21 +08:00
stroke-dashoffset: 0;
stroke-linecap: round;
}
}
}
}
2019-10-15 18:01:18 +08:00
}