Closed (fixed)
Project:
Zen nineSixty (960 Grid system)
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jun 2009 at 04:05 UTC
Updated:
12 Aug 2009 at 11:03 UTC
I see that you included css reordering function. Probably you copied it from ninesixty theme. It won't work because our framework files are in subtheme and we need additional logics because it's Zen subtheme. So this theme needs it's own reordering function, I think.
I just made one, it seem to work. It reorders in this way: framework > modules > basetheme > subtheme
I put it here so maybe there could be some improvements. The only thing it's missing imo, is overriding of framework files. But I removed it because it's not clear how we do that, since this is subtheme.
function zen_ninesixty_css_reorder($css) {
global $theme_info, $base_theme_info;
// Rearrange css files based on their origin
// Order is: framework > module > basetheme > subtheme
foreach ($css as $media => $groups) {
// Setup framework and subtheme groups.
if (isset($css[$media])) {
$css[$media] = array_merge(array('framework' => array()), $css[$media]);
$css[$media]['subtheme'] = array();
}
else {
$css[$media]['framework'] = array();
$css[$media]['subtheme'] = array();
}
$sub = $theme_info->info['stylesheets'][$media];
foreach ($groups['theme'] as $style => $status) {
if (strpos($style, 'framework') !== FALSE) {
// This is framework style! Move to framework group
$css[$media]['framework'][$style] = TRUE;
unset($css[$media]['theme'][$style]);
}
else if (in_array($style, $sub)) {
// This is subtheme style! Move to subtheme group
$css[$media]['subtheme'][$style] = TRUE;
unset($css[$media]['theme'][$style]);
}
}
}
return $css;
}
Comments
Comment #1
onejam commentedThanks Crea for the fixed. I'll give it a test. :-)
Comment #2
onejam commentedI think it should be fine. IMO, generally any overrides will be done in the subtheme as this comes last in the order anyway.
Comment #3
crea commentedOne more note: I didn't verify how it works with conditional styles (for IE). Probably additional logics is needed too.
Comment #4
crea commented