3 ms·
Every CSS rule is effectively in global scope. We had this problem in programming forever. These days, you can put your function in a class in a namespace ...
by FreeHugs 6y ago
Every CSS rule is effectively in global scope.
We had this problem in programming forever. These days, you can put your function in a class in a namespace ... still the namespace sits in global scope. But we never came to the conclusion that we should make all code inline to solve it. Fortunately.
So if you make a CSS rule to make links in your userlist red:
.gizmosUserlist .name a { color: red }
Then yes, it will apply to other .gizmosUserlist instances.
Shadow DOM is a way to prevent it if you want.
Personally, I think it is a good thing, that you can make all links in all gizmosUserlists red if you like and can target a specific one with a more specific selector if you like.