Community

Using style.setProperty() To Keep CSS Property Names Consistent In JavaScript

(Ben Nadel) This morning, while reading an article on theming Angular components by Austin McDaniel, I saw something that I don’t think I’ve ever seen before. Austin was using a .setProperty() method to define an element’s CSS properties in JavaScript.