diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index f98df80..61dc5e5 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -2418,25 +2418,6 @@ function template_preprocess_field(&$variables, $hook) {
     $delta++;
   }
 
-  // Add default CSS classes. Since there can be many fields rendered on a page,
-  // save some overhead by calling strtr() directly instead of
-  // drupal_html_class().
-  $variables['entity_type_css'] = strtr($element['#entity_type'], '_', '-');
-  $variables['field_name_css'] = strtr($element['#field_name'], '_', '-');
-  $variables['field_type_css'] = strtr($element['#field_type'], '_', '-');
-  $variables['attributes']['class'] = array(
-    'field',
-    'field-' . $variables['entity_type_css'] . '--' . $variables['field_name_css'],
-    'field-name-' . $variables['field_name_css'],
-    '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.module.css if the label is inline.
-  if ($element['#label_display'] == 'inline') {
-    $variables['attributes']['class'][] = 'clearfix';
-  }
-
   static $default_attributes;
   if (!isset($default_attributes)) {
     $default_attributes = new Attribute;
diff --git a/core/modules/system/templates/field.html.twig b/core/modules/system/templates/field.html.twig
index a0d527a..17ab311 100644
--- a/core/modules/system/templates/field.html.twig
+++ b/core/modules/system/templates/field.html.twig
@@ -16,20 +16,32 @@
  * - field.html.twig
  *
  * Available variables:
- * - attributes: HTML attributes for the containing element.
  * - label_hidden: Whether to show the field label or not.
  * - title_attributes: HTML attributes for the title.
  * - label: The label for the field.
  * - content_attributes: HTML attributes for the content.
  * - items: List of all the field items.
  * - item_attributes: List of HTML attributes for each item.
- *
- * @see template_preprocess_field()
+ * - attributes: HTML attributes for the containing element.
+  * @see template_preprocess_field()
  *
  * @ingroup themeable
  */
 #}
-<div{{ attributes }}>
+{% set cssclass %}
+{% filter replace({'\n': ' ', '_': '-'}) %}
+field
+field-{{ element['#entity_type'] }}--{{ element['#field_name'] }}
+field-name-{{ element['#field_name'] }}
+field-type-{{ element['#field_type'] }}
+clearfix
+{% if element['#label_display'] == "inline" %}
+field-label-inline
+{% endif %}
+{% endfilter %}
+{% endset %}
+
+<div class="{{ cssclass }} {{ attributes.class }}" {{ attributes }}>
   {% if not label_hidden %}
     <div class="field-label"{{ title_attributes }}>{{ label }}:&nbsp;</div>
   {% endif %}
