'How does JS/Node/Vue/CSS decide which value for a constant applies in a given context?
We've got an in-house library that contains like a couple hundred definitions for constants with names like --color-primary and --spacer-l.
Nothing about the identifiers of these constants indicate any kind of scope, so it would be possible to apply the constants to contexts outside our library.
The names are super generic. I mean, I'm sure I've seen --color-primary on loads of web pages. Considering the number of packages even a trivial node project depends on, it seems all but certain that multiple packages in one's dependency tree would define their own --color-primary.
How does the JS/Node/Vue/CSS stack decide which value for --color-primary wins? Order of import? And if so, how do node developers deal with the risk that changing import order might radically alter the appearance of a component or app?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
