From eef17ade89bb5e195267c5ffc4e4c90ad7fd5487 Mon Sep 17 00:00:00 2001 From: Pedro Augusto Date: Sun, 21 Jul 2024 22:08:17 -0300 Subject: [PATCH] fix(ddg): fix button overlap on DDG card carousel in certain scenarios It seems that when the end-user of DDG changes the background color of the website, some additional styles are also added into the page. This fixes some conflicts where this behavior would lead to a button overlap issue. --- src/scripts/search-engines/duckduckgo.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/scripts/search-engines/duckduckgo.ts b/src/scripts/search-engines/duckduckgo.ts index c73131112..1b0558f59 100644 --- a/src/scripts/search-engines/duckduckgo.ts +++ b/src/scripts/search-engines/duckduckgo.ts @@ -217,10 +217,13 @@ const serpHandler = handleSerp({ }, }); // Increase card size to include the "Block this site" button: - actionRoot.closest(".module--carousel__items")?.classList.add( + actionRoot.closest(".module--carousel")?.classList.add( css({ - height: "320px", - "& > .module--carousel__item": { + height: "unset !important", + "& .module--carousel__items": { + height: "320px", + }, + "& .module--carousel__item": { height: "300px", }, "& .module--carousel__footer": {