|
|
|
|
|
by TimTheTinker
1749 days ago
|
|
I disagree. If a 5px margin is the general rule, then I would argue it's cleaner to apply it generally, and then apply the 10px margin exceptions in separate rules. - When special cases are added or removed, the general rule won't have to be adjusted, just code that handles the special cases. - On the other hand, a single general rule that specifically avoids application to multiple exceptional cases will be pretty long and have multiple :not()s, thus reducing readability and maintainability. Why burden the general rule with knowledge of its exceptions? To me, doing so is a (small) violation of the principle of separation of concerns. |
|