Chris@0: {% extends "field.html.twig" %} Chris@0: {# Chris@0: /** Chris@0: * @file Chris@0: * Default theme implementation for a text field. Chris@0: * Chris@0: * A 'clearfix' class is added, because 'text' fields have a 'format' property Chris@0: * that allows a Text Format to be associated with the entered text, which then Chris@0: * applies filtering on output. A common use case is to align images to the left Chris@0: * or right, and without this 'clearfix' class, such aligned images may be Chris@0: * rendered outside of the 'text' field formatter's boundaries, and hence Chris@0: * overlap with other fields. By setting the 'clearfix' class on all 'text' Chris@0: * fields, we prevent that. Chris@0: * Chris@0: * @see https://www.drupal.org/node/2358529 Chris@0: * Chris@0: * A 'text-formatted' class is added to assist with default styling of base Chris@0: * elements such as paragraphs and lists that may not have classes assigned to Chris@0: * them. This allows user entered content to have default styling without Chris@0: * interfering with the styles of other UI components such as system generated Chris@0: * lists or other dynamic content. Chris@0: * Chris@0: * @see https://www.drupal.org/node/2539860 Chris@0: * Chris@0: * @ingroup themeable Chris@0: */ Chris@0: #} Chris@0: {% set attributes = attributes.addClass('clearfix', 'text-formatted') %}