From 7a4e56eafefcb1dad6f8a6fc909eb0aedb227154 Mon Sep 17 00:00:00 2001 From: 22Alexandra Date: Wed, 6 Apr 2022 14:16:34 +0300 Subject: [PATCH] EWPP-2126: Fix text with featured media spacing issue between items. --- .../pattern-text-featured-media.html.twig | 12 +++++++++-- tests/src/Kernel/fixtures/rendering.yml | 20 +++++++++++-------- .../TextFeaturedMediaAssert.php | 10 +++++----- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/templates/patterns/text_featured_media/pattern-text-featured-media.html.twig b/templates/patterns/text_featured_media/pattern-text-featured-media.html.twig index bd3813fa7..65be5cc47 100644 --- a/templates/patterns/text_featured_media/pattern-text-featured-media.html.twig +++ b/templates/patterns/text_featured_media/pattern-text-featured-media.html.twig @@ -16,7 +16,15 @@ {% endif %} {% set text = text|render %} -{% set media_position_class = 'right' in variant ? '' : ' ecl-u-order-m-last' %} +{% if 'right' in variant %} + {% if highlighted == true %} + {% set media_class = 'ecl-u-pr-l ecl-u-pl-none' %} + {% else %} + {% set media_class = 'ecl-u-pl-none' %} + {% endif %} +{% else %} + {% set media_class = 'ecl-u-order-m-last ecl-u-pr-none' %} +{% endif %} {% set call_to_action_link = '' %} {% if link %} @@ -43,7 +51,7 @@ {% endif %}