commit 073f8e7519a1bb08ae039f8b0b069efc32dc3388 Author: Steve Oliver Date: Sun Mar 31 13:54:56 2013 -0700 This might work to get rid of the automotically added class attributes in template_preprocess. diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 8d527df..1e8a983 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2645,9 +2645,6 @@ function template_preprocess(&$variables, $hook) { 'title_attributes' => clone $default_attributes, 'content_attributes' => clone $default_attributes, ); - - // Initialize html class attribute for the current hook. - $variables['attributes']['class'][] = drupal_html_class($hook); } /** @@ -3121,6 +3118,7 @@ function template_preprocess_region(&$variables) { $variables['content'] = $variables['elements']['#children']; $variables['region'] = $variables['elements']['#region']; + $variables['attributes']['class'][] = 'region'; $variables['attributes']['class'][] = drupal_region_class($variables['region']); $variables['theme_hook_suggestions'][] = 'region__' . $variables['region']; } diff --git a/core/modules/block/block.module b/core/modules/block/block.module index 42f22fa..0d9236b 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -550,6 +550,7 @@ function template_preprocess_block(&$variables) { // Create the $content variable that templates expect. $variables['content'] = $variables['elements']['#children']; + $variables['attributes']['class'][] = 'block'; $variables['attributes']['class'][] = drupal_html_class('block-' . $variables['block']->module); // Add default class for block content. diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index dd87b29..0a322d5 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -1707,6 +1707,7 @@ function template_preprocess_comment(&$variables) { } // Gather comment classes. + $variables['attributes']['class'][] = 'comment'; // 'published' class is not needed, it is either 'preview' or 'unpublished'. if ($variables['status'] != 'published') { $variables['attributes']['class'][] = $variables['status'];