.info styles load before base theme I have a base theme and a sub-theme. The sub-theme specifies a single styles.css in the *.info file. The base theme provides CDN css stylesheets, via this hook:

function MYTHEME_preprocess_html(&amp;$css) {

  drupal_add_css('http://yui.yahooapis.com/pure/0.5.0/pure-min.css', array(
    'group' =&gt; CSS_THEME,
    'preprocess' =&gt; FALSE
  ));

  drupal_add_css('http://yui.yahooapis.com/pure/0.5.0/grids-responsive-old-ie-min.css', array(
    'group' =&gt; CSS_THEME,
    'browsers' =&gt; array('IE' =&gt; 'lte IE 8'),
    'preprocess' =&gt; FALSE
  ));

  drupal_add_css('http://yui.yahooapis.com/pure/0.5.0/grids-responsive-min.css', array(
    'group' =&gt; CSS_THEME,
    'browsers' =&gt; array('IE' =&gt; 'gt IE 8'),
    'preprocess' =&gt; FALSE
  ));

  drupal_add_css('http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css', array(
    'group' =&gt; CSS_THEME,
    'preprocess' =&gt; FALSE
  ));  

}


The resulting HTML is this:

&lt;style type="text/css" media="screen"&gt;@import url("http://mysite.local/sites/all/themes/mytheme/styles.css?nezret");&lt;/style&gt;

&lt;link type="text/css" rel="stylesheet" href="http://yui.yahooapis.com/pure/0.5.0/pure-min.css?nezret" media="all"&gt;

&lt;link type="text/css" rel="stylesheet" href="http://yui.yahooapis.com/pure/0.5.0/grids-responsive-min.css?nezret" media="all"&gt;


I need the @import to come in dead last in rendered order -- otherwise it seems the base theme styles are overriding my theme specific styless...

I have tried to correct this in the sub--theme by doing:

  function MYTHEME_css_alter(&amp;$css) {

    foreach($css as $key =&gt; $value) {
      if($key == 'sites/all/themes/MYTHEME/styles.css') {
        $css[$key]['weight'] = 1000;
      }
    }

    uasort($css, 'drupal_sort_weight');

  }


This fixes the array but not the rendering order...WTF am I missing or doing wrong???
I would be curious to hear a alternative solution but this works too (albeit hackish):

I removed the reference to the stylesheet in *.info and simply added the call inside template.php:

function MYTHEME_preprocess_html(&amp;$vars) {
    drupal_add_css(path_to_theme().'/styles.css', array(
      'group' =&gt; CSS_THEME, 
      'preprocess' =&gt; FALSE
    ));
}