When you write real CSS you could do
.blue { color: blue; }
and if you added the class "blue" to an element after loading, it would turn blue.
In JavaScript you would have to do something like
var blue = document.getElementsByClassName('blue');
for (var i = 0; i < blue.length; i++)
blue[i].style.setProperty('color', 'blue');
The problem with the JavaScript version is if you did
document.getElementById('someId').className += " blue";
it would have the class blue, but it would not turn blue. Is there any way (preferably simple) to add the style to the selector rather then directly to the elements with that selector?