From 5a18bf9f92826a793eaab0f9a8f35589b8df1cf4 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 26 May 2010 11:54:19 +0000 Subject: - Patch #622330 by JohnAlbin, Jeff Burnz: CSS alternative to remove clearfix from inline field markup. --- modules/field/field.module | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/field/field.module b/modules/field/field.module index 4182e88a1..25b9c8265 100644 --- a/modules/field/field.module +++ b/modules/field/field.module @@ -980,6 +980,11 @@ function template_preprocess_field(&$variables, $hook) { 'field-type-' . $variables['field_type_css'], 'field-label-' . $element['#label_display'], ); + // Add a "clearfix" class to the wrapper since we float the label and the + // field items in field.css if the label is inline. + if ($element['#label_display'] == 'inline') { + $variables['classes_array'][] = 'clearfix'; + } // Add specific suggestions that can override the default implementation. $variables['theme_hook_suggestions'] = array( @@ -1090,7 +1095,7 @@ function theme_field($variables) { $output .= ''; // Render the top-level DIV. - $output = '
' . $output . '
'; + $output = '
' . $output . '
'; return $output; } -- cgit v1.2.3