diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 7136416..482029e 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2425,8 +2425,11 @@ function template_preprocess_field(&$variables, $hook) { $variables['attributes']['class']['field_name_css'] = strtr($element['#field_name'], '_', '-'); $variables['attributes']['class']['field_type_css'] = strtr($element['#field_type'], '_', '-'); + // Add a "clearfix" class to the wrapper since we float the label and the + // field items in field.module.css if the label is inline. // Add the label position just in case that the label display is inline. if ($element['#label_display'] == 'inline') { + $variables['attributes']['class'][] = 'clearfix'; $variables['attributes']['class']['label_position'] = 'field-label-' . $element['#label_display']; } diff --git a/core/modules/system/css/system.theme.css b/core/modules/system/css/system.theme.css index 8a3bbc8..f397a5a 100644 --- a/core/modules/system/css/system.theme.css +++ b/core/modules/system/css/system.theme.css @@ -626,11 +626,6 @@ table tr.error { float: right; padding-left: 0.5em; } -.field-label-inline:after { - content: ""; - display: table; - clear: both; -} /* Form display */ form .field-edit-link { diff --git a/core/modules/system/templates/field.html.twig b/core/modules/system/templates/field.html.twig index 260fef0..044a57b 100644 --- a/core/modules/system/templates/field.html.twig +++ b/core/modules/system/templates/field.html.twig @@ -37,7 +37,6 @@ {% set cssclass %} field field-{{attributes.class.entity_type_css}}--{{attributes.class.field_name_css}} field-name-{{attributes.class.field_name_css}} field-type-{{attributes.class.field_type_css}} clearfix {% endset %} -label position: {{ attributes.class.label_position}}
{% if not label_hidden %}
{{ label }}: