I followed the instructions to make a subtheme, thinking it would be handier in case an upgrade of the parent team comes out. Now I discover that this was a stupid route to take, because the show-grid is implemented as preprocess function and these cannot be (easily) overridden in subthemes.

My recommendation is that the function is commented out and instructions are included to activate it when you need it. Alternatively you could include a switch in the theme configuration to turn it on/off.

Comments

natemow’s picture

For now, you can add this to your theme's template.php:

/**
 * Implements hook_preprocess_html().
 */
function yourtheme_preprocess_html(&$vars) {

  // Remove 960GS body.show-grid
  $classes_array = array_flip($vars['classes_array']);
  unset($classes_array['show-grid']);
  $vars['classes_array'] = array_flip($classes_array);

}
ishmael-sanchez’s picture

You can also try applying this patch #1356742: Display a Show Grid theme setting. Other options besides the fix mentioned by @natemow: Create your own SUBTHEMENAME_css_alter function and blow away the debug css.

function SUBTHEMENAME_css_alter(&$css) {
  //dpm($css); // Use with the devel module to see what files are in the $css
  // Remove debug.css file
  unset($css[drupal_get_path('theme', 'ninesixty') . '/styles/framework/debug.css']);
}

Or you can use the info file to remove the styling. Add something like this line to your sub theme info file stylesheets[all][] = styles/debug.css (to override the filename has to be the same). This is telling Drupal to use your debug.css file but since you don't have one in your theme, the one from ninesixty isn't loaded.