chore: fix fumadocs top empty banner shown when in cloudflare worker env

This commit is contained in:
javayhu 2025-06-17 21:17:34 +08:00
parent c3d82d9183
commit 160a7eb929

View File

@ -393,3 +393,21 @@ body {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
/* Fix for Fumadocs empty banner appearing in Cloudflare Worker */
/* This targets the specific banner issue where empty:hidden doesn't work properly */
div[class*="border-t"][class*="bg-fd-secondary"]:not(:has(*)):not(
[data-content]
) {
display: none !important;
}
/* Fallback for banners with the exact classes found in the issue */
.border-t.bg-fd-secondary\/50.p-3:empty {
display: none !important;
}
/* Additional safety for any empty Fumadocs banner */
[class*="fd-secondary"]:empty:not([data-banner-content]) {
display: none !important;
}