Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Semantics, OOCSS and DRY. Re: Semantics, OOCSS and DRY.

#141225
Alen
Participant

You wouldn’t want to target these like this:

.movie-review,
.breaking-news {
background: #eee;
color: #333;
padding: 10px 20px;
}

It’s to specific. Instead, make the article your component: http://codepen.io/anon/pen/KAGvL

So something like:

.article{ /* default styles */}
.article-news{ /* news modifier styles */}

http://nicolasgallagher.com/about-html-semantics-front-end-architecture/