JSFiddle - React, Tailwind, and code Playground
by brigand
HTML
<div id="main"></div>
<div id="out">Value: </div>
CSS
:root {
--example: something;
}
JavaScript
out.textContent += getComputedStyle(main).getPropertyValue('--example')
by brigand
<div id="main"></div>
<div id="out">Value: </div>
:root {
--example: something;
}
out.textContent += getComputedStyle(main).getPropertyValue('--example')