Mercurial > hg > cmmr2012-drupal-site
view core/themes/classy/templates/field/field--text.html.twig @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | c75dbcec494b |
children |
line wrap: on
line source
{% extends "field.html.twig" %} {# /** * @file * Default theme implementation for a text field. * * A 'clearfix' class is added, because 'text' fields have a 'format' property * that allows a Text Format to be associated with the entered text, which then * applies filtering on output. A common use case is to align images to the left * or right, and without this 'clearfix' class, such aligned images may be * rendered outside of the 'text' field formatter's boundaries, and hence * overlap with other fields. By setting the 'clearfix' class on all 'text' * fields, we prevent that. * * @see https://www.drupal.org/node/2358529 * * A 'text-formatted' class is added to assist with default styling of base * elements such as paragraphs and lists that may not have classes assigned to * them. This allows user entered content to have default styling without * interfering with the styles of other UI components such as system generated * lists or other dynamic content. * * @see https://www.drupal.org/node/2539860 * * @ingroup themeable */ #} {% set attributes = attributes.addClass('clearfix', 'text-formatted') %}