Set A Custom CSS Property Variable In JavaScript

February 2025
// TODO: This needs testing

document.documentElement.style.setProperty('--prop-name', 'the-value');
end of line