Skip to content

Commit

Permalink
fix(ddg): fix button overlap on DDG card carousel in certain scenarios
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
aug-dev committed Jul 22, 2024
1 parent 18af182 commit eef17ad
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/scripts/search-engines/duckduckgo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit eef17ad

Please sign in to comment.