4 ms·
> will modifying a rule written to a selector in one file affect a selector in another. Actually this is how it's supposed to work in terms of code reusability
by gotchange 11y ago
> will modifying a rule written to a selector in one file affect a selector in another.
Actually this is how it's supposed to work in terms of code reusability and implicit inheritance. You change a detail in one dependency and that change propagates through the chain to every other dependent object.
The trick is whether that change is intentional or not. When intentional, this is a sign of a good architecture and vice versa and the poor performance can be simply dealt with via good encapsulation to avoid future leaks.
- marrs 11y agoThe "good architecture" there is to begin by making things general and then build specialisation on top of that. This is essentially what the author was saying. At that point its an implementation detail if you have your CSS in one file or many. I think what the author is talking about is when you choose a module structure that is orthogonal to that. That is the square peg that he is referring to, by my interpretation.