I want to store a hex value of color in data-theme attribute like
document.body.setAttribute("data-theme", "#a20000")
How do I use this value in CSS file like following
body[data-theme] {
---theameColor: "data-theme";
}
I want to create an variable that will be used to style all other classes.
I tried this method but it is not working
body[data-theme] {
---theameColor: "data-theme";
}
attr()but support is very limited.