From 1150a503554b1a366e602b4ae27cacf424369851 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Fri, 29 Nov 2024 22:46:28 +0100 Subject: [PATCH] Badges: fix overflow in Discord's css --- src/plugins/_api/badges/fixDiscordBadgePadding.css | 5 +++++ src/plugins/_api/badges/index.tsx | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 src/plugins/_api/badges/fixDiscordBadgePadding.css diff --git a/src/plugins/_api/badges/fixDiscordBadgePadding.css b/src/plugins/_api/badges/fixDiscordBadgePadding.css new file mode 100644 index 00000000..eb1d60d5 --- /dev/null +++ b/src/plugins/_api/badges/fixDiscordBadgePadding.css @@ -0,0 +1,5 @@ +/* the profile popout badge container(s) */ +[class*="biteSize_"] [class*="tags_"] [class*="container_"] { + /* Discord has padding set to 2px instead of 1px, which causes the 12th badge to wrap to a new line. */ + padding: 0 1px; +} diff --git a/src/plugins/_api/badges/index.tsx b/src/plugins/_api/badges/index.tsx index c44d98b9..d02b5e1d 100644 --- a/src/plugins/_api/badges/index.tsx +++ b/src/plugins/_api/badges/index.tsx @@ -16,6 +16,8 @@ * along with this program. If not, see . */ +import "./fixDiscordBadgePadding.css"; + import { _getBadges, BadgePosition, BadgeUserArgs, ProfileBadge } from "@api/Badges"; import DonateButton from "@components/DonateButton"; import ErrorBoundary from "@components/ErrorBoundary";