JSFiddle - React, Tailwind, and code Playground
by will
HTML
<p id="one"><span>This is a paragraph that matches the constraints.</span></p>
<hr>
<p id="two"><span>This is a paragraph that does not match the constraintsconstraintsconstraints.</span></p>
CSS
html, body {
width: 200px;
}
body {
border-right: 1px dashed #FF1111;
}
JavaScript
console.log($('#one span').width()); // returns 200, correct.
console.log($('#two span').width()); // returns 200, but should be larger
console.log($('#two span').outerWidth()); // returns 200, but should be larger
console.log($('#two span').prop('clientWidth')); // returns 200, but should be larger