Comet Tail
Spinner · Fading tail · gradient, smooth
HTML
<div class="utw-loader-comet-tail" role="status"> <span class="utw-loader-comet-tail__sr">Loading…</span> </div>
CSS
/* Spinner loader (Fading tail) */
.utw-loader-comet-tail {
box-sizing: border-box;
position: relative;
display: inline-block;
width: 56px;
height: 56px;
border-radius: 50%;
background: conic-gradient(from 90deg, transparent, #8b5cf6);
-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
animation: utw-loader-comet-tail-spin 1s linear infinite;
}
.utw-loader-comet-tail *,
.utw-loader-comet-tail *::before,
.utw-loader-comet-tail *::after {
box-sizing: border-box;
}
.utw-loader-comet-tail__sr {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
@keyframes utw-loader-comet-tail-spin {
to {
transform: rotate(360deg);
}
}
@keyframes utw-loader-comet-tail-calm {
from {
opacity: 1;
}
to {
opacity: 0.5;
}
}
@media (prefers-reduced-motion: reduce) {
.utw-loader-comet-tail *,
.utw-loader-comet-tail *::before,
.utw-loader-comet-tail *::after {
animation: none !important;
}
.utw-loader-comet-tail {
animation: utw-loader-comet-tail-calm 2s ease-in-out infinite alternate !important;
}
}