Skip to content

Instantly share code, notes, and snippets.

@gcavanunez
Forked from acidjazz/tw-skeleton.css
Created December 28, 2020 13:37
Show Gist options
  • Save gcavanunez/8e7e9aaab0488093858afd82d7a18b30 to your computer and use it in GitHub Desktop.
Save gcavanunez/8e7e9aaab0488093858afd82d7a18b30 to your computer and use it in GitHub Desktop.
tailwind skeleton css
.skeleton {
--text-opacity: 0;
background-image: linear-gradient(100deg, #edf2f7 0%, #f4f7fa 20%, #edf2f7 40%);
background-position: 50%;
background-size: 200%;
animation: skeleton 1.25s infinite linear;
}
.skeleton-teal {
background-image: linear-gradient(100deg, #b4c5f8 0%, #cad8f9 20%, #b4c5f8 40%);
}
.skeleton-white {
background-image: linear-gradient(100deg, #f9fafb 0%, #ffffff 20%, #f9fafb 40%);
}
@keyframes skeleton {
0% {
background-position: 50%;
}
50%, 100% {
background-position: -100%
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment