style

Events happening in the community are now at Drupal community events on www.drupal.org.
jessebeach's picture

Classing elements in stylesheets, a Drupal habit?

As I get more familiar with the coding habits of Drupalists, I'm noticing that there's a preponderance of classed elements in the stylesheets in core. Example:

ul.primary { ... }

This code is in system.css on line 183 (D7).

Is this the preferred style of module developers? I would prefer to see something like

.tab .primary { ... }

instead. It provides more semantic scope. Any other opinions on this? Is there a reason the styles are declared this way that I perhaps just don't know about yet?

Read more
Subscribe with RSS Syndicate content

Design 4 Drupal

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week