JSFiddle - React, Tailwind, and code Playground

HTML

<div class="missing-scroll">
   I'm ellipsized
</div>

CSS

.missing-scroll{
    width: 100px;
    padding: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    white-space: nowrap;
}

JavaScript

var elem = document.querySelector('.missing-scroll');

var offsetWidth = document.createElement('div');
offsetWidth.innerHTML = "Offset width " + elem.offsetWidth + " should be less than";

var scrollWidth = document.createElement('div');
scrollWidth.innerHTML = "Scroll width " + elem.scrollWidth;

var body = document.querySelector('body');
body.appendChild(offsetWidth)
body.appendChild(scrollWidth)