Check out this codepen that showcases my issue:
http://codepen.io/anon/pen/xwQpLy?editors=110
I've been using a little trick to maintain a 1:1 ratio for the box:
.squarebox {
position: relative;
width: 100%;
}
.squarebox::before {
padding-bottom: 100%;
content: "";
display: block;
}
.content {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
However, I'm looking to have the box always fill the smaller of the parent's width or height. In the current setup, it only fills the parent's width.