From a7c436ca1c88b6f5d65bb5e4e66f7e0cef02b550 Mon Sep 17 00:00:00 2001 From: Justin Toupin <21499-justin2pin@users.noreply.drupalcode.org> Date: Thu, 14 Nov 2024 16:53:17 +0000 Subject: [PATCH] Issue #3487531: Icons are duplicated in the component menu --- ...raphs-builder-component-menu--mercury-editor.html.twig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/templates/layout-paragraphs-builder-component-menu--mercury-editor.html.twig b/templates/layout-paragraphs-builder-component-menu--mercury-editor.html.twig index aefc2f55..15ef19a0 100644 --- a/templates/layout-paragraphs-builder-component-menu--mercury-editor.html.twig +++ b/templates/layout-paragraphs-builder-component-menu--mercury-editor.html.twig @@ -35,7 +35,13 @@ {% for type in types.content %} <div class="lpb-component-list__item type-{{type.id}}"> <a{{type.link_attributes.setAttribute('href',type.url)}}> - {% if type.image %}<img src="{{ type.image }}" alt=""/> + {% if type.image %} + <style> + .lpb-component-list__item.type-{{ type.id }} a::before { + background: url({{ type.image }}); + background-size: cover; + } + </style> {% endif %} {{ type.label }}</a> </div> -- GitLab