diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-05-26 11:54:19 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-05-26 11:54:19 +0000 |
commit | 5a18bf9f92826a793eaab0f9a8f35589b8df1cf4 (patch) | |
tree | 5068a2dae467e7a950777153b3cf2db8ade94b01 /modules/field/field.module | |
parent | e6cfb508240c79bf07f298adfab7fcfa8894026e (diff) | |
download | brdo-5a18bf9f92826a793eaab0f9a8f35589b8df1cf4.tar.gz brdo-5a18bf9f92826a793eaab0f9a8f35589b8df1cf4.tar.bz2 |
- Patch #622330 by JohnAlbin, Jeff Burnz: CSS alternative to remove clearfix from inline field markup.
Diffstat (limited to 'modules/field/field.module')
-rw-r--r-- | modules/field/field.module | 7 |
1 files changed, 6 insertions, 1 deletions
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 .= '</div>'; // Render the top-level DIV. - $output = '<div class="' . $variables['classes'] . ' clearfix"' . $variables['attributes'] . '>' . $output . '</div>'; + $output = '<div class="' . $variables['classes'] . '"' . $variables['attributes'] . '>' . $output . '</div>'; return $output; } |