Épinglé
Discussion
How do you structure CSS in a large project?
Our stylesheet is 6,000 lines and every change breaks something. Do you use layers, BEM, utility classes? What actually worked for you?
0 réaction
We moved to one file per component and it fixed most of our merge conflicts.
Utility classes for spacing and layout, components for everything else. Works for a team of eight.
Name things after what they are, not how they look. Saves you on every redesign.
Have you tried cascade layers? They took most of the specificity fights away for us.
BEM still works fine if everyone sticks to it.
Whatever you pick, write it down. A one-page guide matters more than the method.