Skip to main content

CSS Reset Module for Drupal

Submitted by daniel on

I have been using Drupal since 2009 and one of things that is impressive is how modular it is. The core Drupal build is very extensible and there are literally 100's of thousand's of contributed modules out there, many of them regularly updated and maintained by the very active open source Drupal community.

So it has taken me a while to come up with an idea for a Drupal module that no one else seems to have addressed, the idea of a 'CSS reset'.

"Ah, but I have one of those in my theme already!" you say. Yes, but the problem is it is called after any css is declared at a system or module layer. So not only is it standardising browser output, it is essentially resetting anything else that has been declared before drupal gets to the theme reset. Hence, the chance are if you are using a reset here, you'll have to rewrite a whole bunch of styles afterwards to reset the reset! I think you'll agree this is is not very efficient so hence the idea of a Drupal module that provides a reset.

My module is very simple. If allows you to use a css reset of your choice, and makes sure that this is called first, i.e. the css file is weighted to make sure it is called first before any other css is called. This means that the css reset should only reset the browsers as intended and not css that is declared before it gets to the active theme folder.

https://www.drupal.org/sandbox/2dareis2do/2275019

Add new comment

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.