Home › Forums › CSS › ‘DRY’ HTML vs OOCSS Approach? Better to have less HTML or CSS code? › Re: ‘DRY’ HTML vs OOCSS Approach? Better to have less HTML or CSS code?
I’ve always done option 2, but I just read an article about slower css performance that way, but I think it’s a really small hit for most small-medium sites.
It’s preference more than anything, but I like keeping my HTML as clean as possible and rarely even use IDs or classes because I can target things pretty easily most of the time without them.
I bought a book called SMACSS that talks about the option 1 method, but I personally don’t like having to break things down into smaller pieces unless it’s way more efficient to do so.
I can’t stand when I have to work on other people’s code and there’s no rhyme or reason to their naming conventions, so either way, the names should make sense. Good luck!