drupal_add_css does now work when in cache mode I am trying to add a jquery plugin to a page through drupal_add_css and drupal_add_js as follows:

drupal_add_css($path = 'sites/all/libraries/gips/css/gips.css', $type = 'file', $media = 'all', $preprocess = true);
drupal_add_js('sites/all/libraries/gips/js/gips.js', array('type' =&gt; 'file', 'scope' =&gt; 'header', 'weight' =&gt; 3));
drupal_add_js("jQuery(document).ready(function(){...dosomething...});"), array('type' =&gt; 'inline', 'scope' =&gt; 'footer', 'weight' =&gt; 5));


When I'm not aggregating/caching the CSS files, it works fine.
When I try to aggregate the CSS files, it doesn't. The behavior is as if some css rules get lost in the process. 
The same happens even if I change the $preprocess to false.

From Chrome's code inspector, I cannot see any overriding rules getting in the way either.

I am at a loss on how to debug this. Any suggestions?
While you are using the version 7 drupal_add_js, the snippet you posted appears to be using the Drupal 6 arguments for drupal_add_css. You might also need to set the every_page option to true so that it is aggregated. Maybe try:

drupal_add_css('sites/all/libraries/gips/css/gips.css', array('type' =&gt; 'file', 'media' =&gt; 'all', 'preprocess' =&gt; true, 'every_page' =&gt; true));


You could also have a look at the group and weight settings on the api page linked above to see if they will help.