I am looking for a library/code that reads styles for the elements from a string and then applies the styles to the elements in that string. For example consider this code:
jsLibrary.setStyle("body{width:90%}div{background:red}.blue{color:bule}");
I want this library to read the string passed to it as parameter and then set the styles for body
, div
, and .blue
.
does such a thing exist?