3 ms·
> constants Constants which you can redefine/shadow in scopes, and change the values of at runtime via JS. They seem like variables to me.
by the_other 9mo ago
> constants
Constants which you can redefine/shadow in scopes, and change the values of at runtime via JS.
They seem like variables to me.
- marcosdumay 9mo ago> and change the values of at runtime via JS No, you can't. You can set a new value and reevaluate everything.
- the_other 9mo agoI’m dumb and don’t understand the distinction you’re making. elem.style.setProperty(‘—var-name’, newValue); … will set a new value for the “constant”. The element will rerender with the new value. You can animate/automate these changes and the element will continue to rerebder with the updated value. To me, that justifies the name “variable” from the perspective of the CSS.