When you extend a .class Sass looks for every occurrence of that class and creates a comma-separated selector to combine them. This is great until you lose sight of the every occurance part. That means that whenever you nest a selector you're extending then that nest will also be added to every other selector that is part of the extend.
It blows up really quickly.
- Avoid extending a nested selector
- Avoid adding styles to an extended .class name
- pay close attention to the compiled css you commit
- learn how to use the
-p
flag when adding commits
git add -p
This let's you add your commits in chunks and makes it easier to spot huge unexpected chunks of compiles css you didn't intend to create.
It's too late to recommend refactoring for Estee until post-launch, but we could manage this issue better if instead of extending .classes we used the Sass concept of "silent" extendables. They start with a %, like '%small-text'.
There's a decent post on them here.