I'm using template_preprocess_panels_pane and I have custom css that need to be generated and inserted in the header depending upon data in the panels pane.
I can do drupal_add_css from template_preprocess_panels_pane, but in the situation that there are 20 panes that need custom css, it results and lots of duplicate data being added to the header. It would be cleaner if I could pass all of this CSS up to template_preprocess_page and add it to the header from there. Likewise, if I want to add data to--for instance--the page classes[] from template_preprocess_node (or whatever)....is there a way to achieve this?
Thanks!