JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<div class="block first">
<h1>Our Cool Heading</h1>
</div>
<div class="block second">
<p>small text</p>
</div>
</div>
CSS
.container {
aspect-ratio: 2 / 1;
width: 400px;
display: flex;
color: white;
}
.first {
width: 50%;
background-color: blue;
}
.second {
background-color: red;
flex-grow: 1
}
.withsystemtextsize {
font-size: 1.75rem;
}
.withmediaquery {
flex-direction: column;
aspect-ratio: auto;
}
.withmediaquery .first {
width: 100%
}