Another method is to use the CSSOM (CSS Object Model), via the style
property on a DOM node.
var myElem = document.querySelector('.my-selector');
myElem.style.color = 'blue';
More details on CSSOM: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement.style
As mentioned by others, enabling unsafe-line
for css is another method to solve this.