Cascading Style Sheets
Quick steps to debug your module's css
Someone on the Drupal Dev list asked what to do when his custom module's CSS wasn't showing up. This is the quick checklist I sent in reply:
In order:
0. Make extra-sure your module's enabled on admin/build/modules
1. Check your drupal_add_css()
call. Should look roughly like:
drupal_add_css(drupal_get_path('module', 'MYMODULE') .'/css/MYMODULE.css');
2. Make sure you're doing drupal_add_css()
inside hook_init()
CSS: ur doin it wrong.
So I'm over on codinghorror reading a blog by one of the Stack Overflow guys about how CSS is super limited. Jeff hits us with a couple examples of how CSS falls short and then goes on to explore a couple Ruby gems that supposedly shine up the giant turds that are cascading stylesheets.
Jeff's 3 problems with CSS are:
- Vertical alignment is a giant, hacky PITA.
- Lack of variables so we have to repeat colors all over the place.
