JSFiddle - React, Tailwind, and code Playground

HTML

<div class="container">
    <div class="columns" style="height: auto; position: absolute;">

        <p>Proin sed massa elit. Integer sollicitudin ligula ac risus venenatis bibendum. Quisque quam eros, varius nec faucibus quis, semper in dolor. Cras sed suscipit justo. Aliquam erat volutpat. Donec sit amet urna egestas nibh ornare dignissim et a massa. Morbi eros tortor, lobortis et purus non, rhoncus condimentum est. Fusce vulputate turpis sit amet ante mollis, nec luctus elit pharetra. Maecenas sed risus eget sapien molestie blandit. Vivamus dapibus, diam non tincidunt venenatis, odio purus accumsan erat, id interdum metus dolor id nunc. Cras euismod dolor viverra, placerat odio vel, vestibulum diam.</p> </div>
</div>
<div id="output"></div>

CSS

.container {
    border: 1px solid green;
    position: relative;
    height: 390px;
    margin-bottom: 90px;
    overflow-y: auto;
}
#output {
    border: 1px solid blue;
}

JavaScript

$(function () {
        // create your method for checking the resize
        function resizeContainers() {
            // get a reference to the .container element and the .columns element
            var $container = $('.container');
            var $cols = $('.columns');
            // set the height on $container
            $container.css('height', $(window).height() - 200);
            // THis is just here so you can see, as you resize the frame, 
            // that this is testing the sizes 
            $("#output").html("$cols.height() : " + $cols.height() + "\n$container.height() : " + $container.height());
            // Now compare the height of the $cols item to the $container height
            if ($cols.height() > $container.height()) {
                $container.css("box-shadow", "inset 0px -13px 8px -10px #868686");
            } else {
                // this will remove the box shadow when the content does not exceed
                // the container height
                $container.css("box-shadow","");   
            }
        }
    
        // Now, tell the window object to listen for resize events and call resizeContainers
        $(window).resize(resizeContainers);
        // Call it manually once
        resizeContainers();
    });