JSFiddle - React, Tailwind, and code Playground
HTML
<span id="test">word</span>
JavaScript
console.log('jquery css:', $('#test').css('width'));
console.log('getComputedStyle:', window.getComputedStyle(document.getElementById('test')).width);
<span id="test">word</span>
console.log('jquery css:', $('#test').css('width'));
console.log('getComputedStyle:', window.getComputedStyle(document.getElementById('test')).width);