JSFiddle - React, Tailwind, and code Playground

by tea4two

HTML

<div class="parent">
  <div class="logo"><img src="http://via.placeholder.com/768x512/ddd/fff" alt=""></div>
  <p>splash text</p>
</div>

SCSS

img {
  vertical-align: top;
}
.parent {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: yellow;
  height: 100vh;
}

.logo {
  border: 1px solid #ccc;
  /* height: 80%; */
  width: 100%;
  max-width: 768px;
  height: 0;
  padding-top: calc((512/768)*100*1%);
  position: relative;
  
  img {
    position: absolute;
    width: 100%;
    /* height: 100%; */
    top: 0;
    left: 0;
  }
  
  p {
    text-align: center;
  }
}