Fix display of inline labels; remove label (block) class

This commit is contained in:
benjamin melançon 2018-10-31 01:35:37 -04:00
parent e4df5e2927
commit a838001892

View file

@ -44,7 +44,6 @@
set title_classes = [
'label',
label_display == 'visually_hidden' ? 'visually-hidden',
label_display == 'inline' ? 'is-pulled-left'
]
%}
{% set title_attributes = title_attributes.addClass(title_classes) %}
@ -55,6 +54,13 @@
{% for item in items %}
{{ item.content}}
{% endfor %}
{% else if label_display == 'inline' %}
<p{{ attributes.removeClass('label') }}>
<label{{ title_attributes }}>{{ label }}</label>
{% for item in items %}
<strong>{{ item.content }}</strong>
{% endfor %}
</p>
{% else %}
<p{{ attributes }}>
<label{{ title_attributes }}>{{ label }}</label>