I am experiencing a strange problem when attempting to center an element with aspect-ratio applied. I thought it would work similar to centering an image, but I keep getting stuck with an element of 0px x 0px.
https://codepen.io/richardcool/pen/xxeKOwp
I have set up a simple CodePen demo to illustrate the issue. When I remove the align-items: center
line, the element turns into 0px x 0px. I have also experimented with centering using absolute positions, but encountered the same problem.
Any suggestions or thoughts on how to solve this?