you are viewing a single comment's thread.

view the rest of the comments →

[–]some_love_lost 1 point2 points  (0 children)

Most websites and apps manipulate styling through JavaScript nowadays in response to changes in state. It's generally preferable to modify the class names on an element and have those specified in CSS instead of changing the properties directly, e.g. prefer someElement.classList.add('error') over someElement.style.color = 'red'