Open yukulele opened 1 year ago
This polyfill only work with width based elements
example:
<div class="width-based aspect-ratio-box"></div> <div class="height-based aspect-ratio-box"></div>
.width-based { display: inline-block; border: 1px solid blue; width: 80px; } .height-based { display: inline-block; border: 1px solid red; height: 80px; } .aspect-ratio-box::before { float: left; padding-top: 56.25%; content: ''; } .aspect-ratio-box::after { display: block; content: ''; clear: both; }
the 2nd element have a 0px width
the same with me
This polyfill only work with width based elements
example:
the 2nd element have a 0px width