CSS variables get and set in JS
// Get variable from inline style
element.style.getPropertyValue('--foo');
// Get variable from wherever
getComputedValue(element).getPropertyValue('--foo');
// Set variable on inline style
element.style.setProperty('--foo', 20);