From 3273d4af2ad8dd2e6627aa33bffa6e82eb8f9663 Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 31 Oct 2025 18:06:23 +0100 Subject: [PATCH] Make receipt page responsive and add print page breaks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Increase max width from max-w-3xl to max-w-4xl/5xl for better screen fit - Add responsive breakpoints: full width on mobile, constrained on larger screens - Add print-page-break class for automatic page breaks between sections - Each major section now prints on separate page: - Page 1: Order summary with payment details - Page 2: Portfolio distribution chart - Page 3: Carbon impact comparisons - Improve print styling: remove shadows, borders, rounded corners - Set print page size to standard letter format - Reduce padding on mobile for better space utilization Fixes receipt layout to be responsive on all screen sizes while maintaining excellent print quality with proper page breaks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/pages/CheckoutSuccess.tsx | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/pages/CheckoutSuccess.tsx b/src/pages/CheckoutSuccess.tsx index a18efdf..7267d2c 100644 --- a/src/pages/CheckoutSuccess.tsx +++ b/src/pages/CheckoutSuccess.tsx @@ -141,21 +141,26 @@ export default function CheckoutSuccess({ .print-logo { max-width: 200px !important; } + .print-page-break { + page-break-after: always !important; + break-after: page !important; + } @page { margin: 0.5in; + size: letter; } } `} -
+
- {/* Receipt Container */} -
+ {/* Receipt Container - Page 1 */} +
{/* Header with Logo */}
- {/* Portfolio Distribution Chart */} + {/* Portfolio Distribution Chart - Page 2 */} {orderDetails.order.portfolio?.projects && orderDetails.order.portfolio.projects.length > 0 && ( -
+

Your Carbon Offset Distribution

@@ -322,14 +327,14 @@ export default function CheckoutSuccess({ )} - {/* Impact Comparisons */} + {/* Impact Comparisons - Page 3 */} -
+