I see a lot of articles/posts about the difficult of CSS.
Finding it hard to maintain, or resulting in spaghetti code.
Is this a common occurrence?

Whilst I've come across it in a few projects before, I wouldn't say it's a regular.
Now a lot of our sites are built on CMS' (Umbraco), but here's my approach.

I'll style the generic elements first across all pages
User generated content is usually in its own CSS class (for nested targeting, e.g. ul/ol tags)
Then I'll give each Document Type (post type/page type) it's own body class and apply specific styling to that page where needed.

Hopefully that's of help to some of you. I'm interested to hear your approaches to it! :)

Add Comment