Now that CSS supports not only custom properties but also environment variables I would like to know how they can be changed programmatically using javascript.
The following example will render a text in purple
color.
Is it possible to change it to another color e.g. after 5 seconds using a setTimeout?
div {
color: env(PRIMARY, purple)
}
<div>Hello world</div>