JSFiddle - React, Tailwind, and code Playground

by Serhio Magpie

HTML

<div class="parent">
    <div class="table">
        <div class="cell">
            <div class="block">
                <img src="http://habrastorage.org/files/50f/7b2/1cc/50f7b21ccabd4b20bc0369f228138b5b.jpg" alt=""/>
            </div>
        </div>
    </div>
</div>

SCSS

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.parent {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow: auto;
    
    .table {
        width: 100%;
        height: 100%;
        display: table;
    }
    
    .cell {
        display: table-cell;
        text-align: center;
        vertical-align: middle;
    }
}

.block {
    display: inline-block;
    background: #60a839;
    
    img {
        display: block;
        border: none;
    }
}