score:0

you can have conditional css by using plain javascript. create a style element and append a cssrule. like this :

const usercolor = "green" //get from db of course

var style = document.createelement("style");
style.appendchild(document.createtextnode(""));
document.head.appendchild(style);

style.sheet.insertrule(".thirdpartydiv { color:"+usercolor+"; }", 0);

it will insert a styledomelement to your page. load the file when you start your app.

edit: doc - https://developer.mozilla.org/fr/docs/web/api/cssstylesheet/insertrule


Related Query

More Query from same tag