Quantcast
Viewing all articles
Browse latest Browse all 49203

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?

Actually, I'd much rather prefer no CSS in core at all, but I'm sure there are well-beaten threads about that topic already.


Viewing all articles
Browse latest Browse all 49203

Trending Articles