Classing elements in stylesheets, a Drupal habit?
Posted by jessebeach on May 4, 2010 at 3:54pm
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