Set 'is-color' variants based on in-content selection
This commit is contained in:
parent
ee543ce2e6
commit
ccd624460d
1 changed files with 3 additions and 1 deletions
|
@ -42,13 +42,15 @@
|
|||
set classes = [
|
||||
'hero',
|
||||
'hero-project',
|
||||
'is-cinnamon',
|
||||
'paragraph',
|
||||
'paragraph--type--' ~ paragraph.bundle|clean_class,
|
||||
view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class,
|
||||
not paragraph.isPublished() ? 'paragraph--unpublished'
|
||||
]
|
||||
%}
|
||||
{% if content.field_style_color %}
|
||||
{% set classes = classes|merge(['is-'~content.field_style_color|render|trim]) %}
|
||||
{% endif %}
|
||||
{% block paragraph %}
|
||||
<section{{ attributes.addClass(classes) }}>
|
||||
{% block content %}
|
||||
|
|
Loading…
Reference in a new issue