From 1f961b9075f8ae128c41fac09eaa4c38122d4503 Mon Sep 17 00:00:00 2001 From: Prastowo Agung Widodo Date: Thu, 26 Mar 2026 18:08:20 +0700 Subject: [PATCH] fix: print area should not include sidebar and message list --- app/globals.css | 31 +++++++++++++++++++++++++++++++ components/email/email-viewer.tsx | 9 +++++---- package-lock.json | 4 ++-- 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/app/globals.css b/app/globals.css index 0aeaa4d..105387f 100644 --- a/app/globals.css +++ b/app/globals.css @@ -428,3 +428,34 @@ body { -webkit-backdrop-filter: none !important; } } + +@media print { + html { + --sidebar-width: 0px !important; + } + body * { + visibility: hidden !important; + } + #email-viewer-container, + #email-viewer-container * { + visibility: visible !important; + } + #email-viewer-container { + position: fixed !important; + left: 0; + top: 0; + width: 100vw; + min-height: 100vh; + display: block !important; + background: white !important; + z-index: 9999; + box-shadow: none !important; + border: none !important; + } + #email-content-area { + overflow: hidden !important; + height: auto !important; + display: block !important; + } +} + diff --git a/components/email/email-viewer.tsx b/components/email/email-viewer.tsx index 2ddba94..bcaa38a 100644 --- a/components/email/email-viewer.tsx +++ b/components/email/email-viewer.tsx @@ -691,6 +691,7 @@ export function EmailViewer({ return (
{/* Loading overlay when fetching new email */} @@ -916,7 +917,7 @@ export function EmailViewer({
{/* More Actions Dropdown */} -
+