23
Took me 6 months to realize I was nesting my CSS selectors all wrong
I was doing something like .header .nav .item .link for every single element. My stylesheet was 800 lines deep and I kept getting specificity conflicts. Finally a guy on a Discord server asked me why I was making it so hard on myself. He showed me BEM. Took about an hour to rewrite the whole thing and cut it down to 300 lines. Anyone else have that moment where you realize you've been fighting against the tool instead of using it right?
1 comments
Log in to join the discussion
Log In1 Comment
kai8074d ago
Last week I realized I'd been using IDs for everything and had to undo like 50 of them.
4