D
28

Critique on my messy CSS finally clicked after a co-worker showed me how he structures his stylesheets

He told me my classes were all over the place and suggested grouping by component instead of page. After refactoring one project that way, I cut out 40 lines of duplicated code. Has anyone else had a simple structural change completely shift how you code?
2 comments

Log in to join the discussion

Log In
2 Comments
black.amy
black.amy14d ago
Oh man, a friend of mine had the same lightbulb moment with his flexbox layouts last month...
5
jana_hernandez
Actually I read this article last week about a dev who said his whole workflow improved once he started using BEM naming. He claimed it made his CSS way more predictable and easier to scan.
1