div.is-loading { position: fixed; z-index: 999; overflow: show; margin: auto; top: 0; left: 0; bottom: 0; right: 0; } div.is-loading:after { animation: spinAround 500ms infinite linear; border: 2px solid hsl(0deg, 0%, 86%); border-radius: 9999px; border-right-color: transparent; border-top-color: transparent; content: ""; display: block; position: relative; top: calc(50% - 5em); left: calc(50% - 5em); width: 10em; height: 10em; border-width: 0.25em; }