Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sass for implementing image placeholders of different aspect ratios
.image-loading-container {
display: block;
position: relative;
height: 0;
.image-container{
padding-bottom: 100%;
img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment