Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just traced a styling problem back to system.theme.css (in /modules/system). I discovered that this problem has existed in D7 since at least 2006, and that Dries opted against fixing it as of 2011, to avoid the risk of affecting existing themes.

I disabled the entire file (system.theme.css) and don't notice any differences on my site, either the public facing side or the administrative UI. Is there any reason to keep it around?

The bigger (and real) question, though is: what is the accepted solution to this problem? I can see several possibilities, but all have potential drawbacks, and I'm sure (since every user of D7 faces this ugliness) there are others who've tried several approaches and can advise all of us which are best.

Here are some possibilities:

  • edit the file
  • delete the file
  • override the offending selector (tbody) with a different rule in another CSS file
  • something else I haven't thought of

I don't really like the idea of modifying core, so the first two are not great, but I don't want a bunch of CSS being loaded that isn't being used either. What is the normal solution to this?

share|improve this question

closed as off-topic by Pierre.Vriens, Adrian Cid Almaguer, Елин Й., No Sssweat, Scott Joudry Mar 7 at 12:01

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question was caused by a problem that can no longer be reproduced, was solved by a cache clear, or was a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers." – Pierre.Vriens, Adrian Cid Almaguer, Елин Й., No Sssweat, Scott Joudry
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 2 down vote accepted

It's got to be option 3 (overriding the offending selector (tbody) with a different rule in another CSS file) really, the only potential drawback is a few extra bytes of data to download and a fraction of a millisecond in processing time at the client end to apply the override. Both so small as to be unnoticeable.

CSS was built to be cascading so overriding a previously set style is well in keeping with the spirit of the 'language'. This has always annoyed me too and I pretty much instinctively add the override style when creating a theme from scratch. It hasn't caused me any problems to date and I can't see it doing so in the future.

That said, if you don't need the styles from system.theme.css the best thing to do would be to remove it completely with hook_css_alter()

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.