home ~ projects ~ socials

Set A Custom CSS Property Variable In JavaScript

// TODO: This needs testing

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