uk-ratio component can be applied to any element rather than just images, videos, or iframes.<canvas> element 馃槙). uk-ratio-16-9@l , uk-ratio-4-3@m , uk-ratio-1-1@s)Let me know what you think about this 馃檪
<div class="uk-ratio uk-ratio-16-9">
<div class="uk-position-cover">...</div>
</div>
_(The .uk-position-cover class is required)_
CodePen: https://codepen.io/drmzio/pen/rrKvZQ
_Tip: Try resizing your window_
https://www.w3schools.com/howto/howto_css_aspect_ratio.asp
I've made a simple layout using the uk-ratio component.
CodePen: https://codepen.io/drmzio/full/yqRqvW/

These blocks are all divs and nothing special. You can easily replace any of them with an image, video, iframe, or anything you want!
Maybe you want a photo gallery, but with different size images? No problem!
CodePen: https://codepen.io/drmzio/full/NBOLNZ/

+1
Very cool
Like to have that, as the Best Practice Lighthouse test in my app fails because of wrong responsive image aspect ratio.
Most helpful comment
+1