From a80f86e99e9b785e63c75521dcac2118fb4189bb Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Tue, 10 Feb 2026 03:23:41 +0100 Subject: [PATCH] fix clipping of heading issue on lapras template --- src/components/resume/templates/lapras.tsx | 3 +++ src/integrations/orpc/services/printer.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/resume/templates/lapras.tsx b/src/components/resume/templates/lapras.tsx index 2340cff5e..13e1f4f6f 100644 --- a/src/components/resume/templates/lapras.tsx +++ b/src/components/resume/templates/lapras.tsx @@ -14,6 +14,9 @@ const sectionClassName = cn( // Section Heading "[&>h6]:-mt-(--heading-negative-margin) [&>h6]:max-w-fit [&>h6]:bg-(--page-background-color) [&>h6]:px-4", + + // Push the first section of a page down, to avoid clipping the header + "group-data-[layout=main]:first-of-type:mt-4", ); /** diff --git a/src/integrations/orpc/services/printer.ts b/src/integrations/orpc/services/printer.ts index c1d95e9e2..718e01ea6 100644 --- a/src/integrations/orpc/services/printer.ts +++ b/src/integrations/orpc/services/printer.ts @@ -173,7 +173,7 @@ export const printerService = { ? getComputedStyle(container).getPropertyValue("--page-height").trim() : null; const currentHeight = containerHeight || rootHeight; - const heightValue = Math.max(Number.parseFloat(currentHeight), minPageHeight); + const heightValue = Math.min(Number.parseFloat(currentHeight), minPageHeight); if (!Number.isNaN(heightValue)) { // Subtract top + bottom margins from page height