JSFiddle - React, Tailwind, and code Playground

by kevinPHPkevin

HTML

<div class = "wrapper">
    <div class = "main">
    </div>
</div>

CSS

html, body {
 height: 100%;
 width: 100%;    
}
.wrapper {
 width: 50%;
 display: inline-block;
 position: relative;
}
.wrapper:after {
    padding-top: 100%; /*Sets ratio*/
    display: block;
    content: '';
}
.main {
    position: absolute;
    top: 0; bottom: 0; right: 0; left: 0; 
    background-color: rgb(0, 162, 232);
}