diff --git a/core/modules/comment/templates/field--comment.html.twig b/core/modules/comment/templates/field--comment.html.twig index 9aae572..5aaa7b0 100644 --- a/core/modules/comment/templates/field--comment.html.twig +++ b/core/modules/comment/templates/field--comment.html.twig @@ -22,7 +22,19 @@ * @see comment_preprocess_field() */ #} - + +{% + set classes = [ + 'field', + 'field-' ~ entity_type|clean_class ~ '--' ~ field_name|clean_class, + 'field-name-' ~ field_name|clean_class, + 'field-type-' ~ field_type|clean_class, + 'field-label-' ~ label_display + 'comment-wrapper' + ] +%} + + {% if comments and not label_hidden %} {{ title_prefix }} {{ label }} diff --git a/core/modules/node/templates/field--node--title.html.twig b/core/modules/node/templates/field--node--title.html.twig index 25432c0..4bfc166 100644 --- a/core/modules/node/templates/field--node--title.html.twig +++ b/core/modules/node/templates/field--node--title.html.twig @@ -15,4 +15,15 @@ * @ingroup themeable */ #} -{{ items }} + +{% + set classes = [ + 'field', + 'field-' ~ entity_type|clean_class ~ '--' ~ field_name|clean_class, + 'field-name-' ~ field_name|clean_class, + 'field-type-' ~ field_type|clean_class, + 'field-label-' ~ label_display + ] +%} + +{{ items }} diff --git a/core/modules/system/templates/field.html.twig b/core/modules/system/templates/field.html.twig index 37f2d84..fdf45c4 100644 --- a/core/modules/system/templates/field.html.twig +++ b/core/modules/system/templates/field.html.twig @@ -16,17 +16,17 @@ * - 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. - * - attributes: HTML attributes for the containing element. - * - entity_type: The entity type to which the field belongs. - * - field_name: The name of the field. - * - field_type: The type of the field. - * - label_display: The display of the label for the field. + * - entity_type: The entity type to which the field belongs. + * - field_name: The name of the field. + * - field_type: The type of the field. + * - label_display: The display of the label for the field. * * @see template_preprocess_field() * @@ -40,15 +40,15 @@ 'field-' ~ entity_type|clean_class ~ '--' ~ field_name|clean_class, 'field-name-' ~ field_name|clean_class, 'field-type-' ~ field_type|clean_class, - 'field-label-' ~ label_display|clean_class + 'field-label-' ~ label_display ] %} -
+ {% if not label_hidden %} -
{{ label }}: 
+ {{ label }}: 
{% endif %} -
+ {% for delta, item in items %}
{{ item }}
{% endfor %} diff --git a/core/themes/bartik/templates/field--taxonomy-term-reference.html.twig b/core/themes/bartik/templates/field--taxonomy-term-reference.html.twig index 4c579ee..2307cf9 100644 --- a/core/themes/bartik/templates/field--taxonomy-term-reference.html.twig +++ b/core/themes/bartik/templates/field--taxonomy-term-reference.html.twig @@ -16,7 +16,18 @@ * @see bartik_preprocess_field() */ #} -
+{% + set classes = [ + 'field', + 'field-' ~ entity_type|clean_class ~ '--' ~ field_name|clean_class, + 'field-name-' ~ field_name|clean_class, + 'field-type-' ~ field_type|clean_class, + 'field-label-' ~ label_display, + 'clearfix' + ] +%} + + {% if not label_hidden %} {{ label }}: {% endif %}