Let's say we have responsive rectangle. I need to fit square element into rectangle and it should be 100% of its height. How could you do it with CSS only (no SVG and JS, no fixed sizes)? In other words: make child element's width equal to parent element's height?
It's easily done with SVG as child element using viewbox property but I need pure CSS solution.
<div style="width: 95vw; height: 100%; border: 2px solid #f00">
<div style="border: 2px solid #0f0">I'm 100% of parent's height but also I'm not square</div>
</div>