Skip to content

Instantly share code, notes, and snippets.

@edazpotato
Forked from oze4/v-cloak.css
Last active September 22, 2020 01:19
Show Gist options
  • Save edazpotato/bb2e266131d367da1b03d0560c2fa27d to your computer and use it in GitHub Desktop.
Save edazpotato/bb2e266131d367da1b03d0560c2fa27d to your computer and use it in GitHub Desktop.
v-cloak for vue.js loading
[v-cloak] {
visibility: hidden;
display: block;
padding: 50px 0;
}
@keyframes spinner {
to {
transform: rotate(360deg);
}
}
[v-cloak]:before {
content: "";
box-sizing: border-box;
position: absolute;
top: 50%;
left: 50%;
width: 20px;
height: 20px;
margin-top: -10px;
margin-left: -10px;
border-radius: 50%;
border: 2px solid #ccc;
border-top-color: #333;
animation: spinner 0.6s linear infinite;
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
[v-cloak]>* {
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment