manipulate css :root variable

May 4, 08:22 AM

to remove rule:

stylesheet.deleteRule(index),

(loop to find the right value)

==========================================================

// https://webplatform.github.io/docs/tutorials/Dynamic_style_-_manipulating_CSS_with_JavaScript/
// https://stackoverflow.com/questions/70251599/how-to-use-cssstylesheet-insertrule-to-change-a-root-property/71875353

to manipulate the “—” rules such as “—marksVariableName, it has to be done in the” selector and use insertRule:”

this should turn the background color from red to whatever value is in the hash.
Mark Edwards

,

---

Commenting is closed for this article.

---