From 91c3700343a28c4f18365031b6a8dbdcb9dde9d8 Mon Sep 17 00:00:00 2001 From: Rafael Martins Date: Sat, 1 Aug 2026 17:57:15 -0300 Subject: [PATCH 1/3] fix(responsive): remove the 4k scale override MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #7. `app/globals.css` declared a custom `--breakpoint-4k: 2560px`, and 170 hand-written `4k:*` utilities across 17 files then multiplied every font size, padding, gap and icon dimension by two to four times — up to `4k:text-[14rem]` for the headline number. On a large display the site did not show more content, it showed the same content enormously magnified. The breakpoint is also misnamed: 2560px is QHD width, not 4K. Anyone on a 1440p monitor at 100% scaling was already getting the blow-up, which matches the report better than the issue title does. Deleting the utilities cannot regress anything below 2560px, because `4k:` compiles to `@media (width >= 2560px)` — none of the 170 had any effect at normal widths. Large screens now get the normal type scale, and legibility is left to browser and OS zoom, which is what the removal of `maximumScale: 1` restored. Ten of the utilities never worked at all. `2560px` is a px value while Tailwind's default breakpoints are rem, and mixing units breaks the variant sort order, so `4k:` was emitted before `sm:`…`2xl:` and lost to any rem variant touching the same property. Measured at 3840x2160, `4k:max-w-[2400px]` produced a 1600px container and `4k:text-[14rem]` produced 96px. Co-Authored-By: Claude Opus 5 --- app/globals.css | 4 -- app/page.tsx | 18 ++++---- components/atoms/button.tsx | 5 +-- components/atoms/input.tsx | 4 +- components/atoms/label.tsx | 2 +- components/molecules/copy-button.tsx | 17 ++------ components/molecules/date-time-input.tsx | 8 ++-- components/molecules/duration-row.tsx | 11 ++--- components/molecules/extra-entry-list.tsx | 4 +- components/molecules/extra-entry-row.tsx | 6 +-- components/molecules/hero-panel.tsx | 25 +++++------ components/molecules/stat-box.tsx | 12 +++--- components/organisms/journey-form.tsx | 46 +++++++++------------ components/organisms/salary-calculator.tsx | 48 ++++++++++------------ components/organisms/tax-details-panel.tsx | 4 +- components/organisms/work-calculator.tsx | 14 +++---- components/organisms/work-summary.tsx | 28 +++++-------- components/templates/calculator-layout.tsx | 8 ++-- 18 files changed, 109 insertions(+), 155 deletions(-) diff --git a/app/globals.css b/app/globals.css index 3c3c46a..9c0f814 100644 --- a/app/globals.css +++ b/app/globals.css @@ -1,7 +1,3 @@ @import "tailwindcss"; -@theme { - --breakpoint-4k: 2560px; -} - @custom-variant dark (&:where(.dark, .dark *)); diff --git a/app/page.tsx b/app/page.tsx index 60d6613..4e0e18d 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -62,19 +62,19 @@ export default function Home() {
-
-
-
- +
+
+
+
-

+

WorkLoad

-
- +
+ {currentTime === null ? PLACEHOLDER_CLOCK @@ -94,9 +94,9 @@ export default function Home() { title="Alternar tema" > {resolvedTheme === "dark" ? ( - + ) : ( - + )}
diff --git a/components/atoms/button.tsx b/components/atoms/button.tsx index ec6b44c..0c658f1 100644 --- a/components/atoms/button.tsx +++ b/components/atoms/button.tsx @@ -24,11 +24,10 @@ const Button = React.forwardRef( variant === "ghost", "bg-red-500/10 text-red-600 hover:bg-red-500/20": variant === "danger", - "h-12 px-6 py-2 text-base 4k:h-20 4k:px-12 4k:text-2xl": - size === "default", + "h-12 px-6 py-2 text-base": size === "default", "h-9 rounded-md px-3 text-sm": size === "sm", "h-14 rounded-2xl px-8 text-lg": size === "lg", - "h-10 w-10 4k:h-16 4k:w-16": size === "icon", + "h-10 w-10": size === "icon", }, className, )} diff --git a/components/atoms/input.tsx b/components/atoms/input.tsx index de147cc..70b203f 100644 --- a/components/atoms/input.tsx +++ b/components/atoms/input.tsx @@ -18,8 +18,8 @@ const Input = React.forwardRef( - + {STATUS_MESSAGES[status]}
diff --git a/components/molecules/date-time-input.tsx b/components/molecules/date-time-input.tsx index fb3e31b..4a8d5dc 100644 --- a/components/molecules/date-time-input.tsx +++ b/components/molecules/date-time-input.tsx @@ -10,7 +10,7 @@ const TIME_GROUPS = [2, 2] as const; const BR_DATE_FORMAT = "dd/MM/yyyy"; const ISO_DATE_FORMAT = "yyyy-MM-dd"; const FIELD_CLASSES = - "h-14 4k:h-20 focus-visible:ring-indigo-500 placeholder:text-neutral-500"; + "h-14 focus-visible:ring-indigo-500 placeholder:text-neutral-500"; const toBRDate = (isoDate: string) => { if (!isoDate) return ""; @@ -67,9 +67,9 @@ export function DateTimeInput({
@@ -85,7 +85,7 @@ export function DateTimeInput({ className={FIELD_CLASSES} />
-
+
-
-
); } diff --git a/components/molecules/extra-entry-list.tsx b/components/molecules/extra-entry-list.tsx index e743708..d7ff68e 100644 --- a/components/molecules/extra-entry-list.tsx +++ b/components/molecules/extra-entry-list.tsx @@ -25,9 +25,7 @@ export function ExtraEntryList({ return (
-

- {label} -

+

{label}

-
+
-
); diff --git a/components/molecules/hero-panel.tsx b/components/molecules/hero-panel.tsx index 24f98ab..4ab0b98 100644 --- a/components/molecules/hero-panel.tsx +++ b/components/molecules/hero-panel.tsx @@ -29,35 +29,30 @@ export function HeroPanel({ return (
-
-
-
+
+
+
-
-
-
-

+

+

{value}

{children}
{footer ? ( -
- {footer} -
+
{footer}
) : null}
diff --git a/components/molecules/stat-box.tsx b/components/molecules/stat-box.tsx index 964f4b6..738d7c3 100644 --- a/components/molecules/stat-box.tsx +++ b/components/molecules/stat-box.tsx @@ -21,7 +21,7 @@ export function StatBox({ return (
-
+
{icon} - + {label}
{subValue && ( -
- {subValue} -
+
{subValue}
)}
); diff --git a/components/organisms/journey-form.tsx b/components/organisms/journey-form.tsx index f66c32c..9d0e2a6 100644 --- a/components/organisms/journey-form.tsx +++ b/components/organisms/journey-form.tsx @@ -86,10 +86,10 @@ export function JourneyForm({ const [showSettings, setShowSettings] = useState(false); return ( -
-
+
+
-

Sua Jornada

+

Sua Jornada

-
+
@@ -117,7 +117,7 @@ export function JourneyForm({ type="button" aria-pressed={isManualExit} onClick={() => onManualExitChange(true)} - className={`px-6 py-2.5 rounded-xl text-xs font-bold transition-all 4k:px-12 4k:py-6 4k:text-3xl 4k:rounded-3xl ${isManualExit ? "bg-white dark:bg-neutral-700 shadow-md text-emerald-500" : "text-neutral-400 hover:text-neutral-600"}`} + className={`px-6 py-2.5 rounded-xl text-xs font-bold transition-all ${isManualExit ? "bg-white dark:bg-neutral-700 shadow-md text-emerald-500" : "text-neutral-400 hover:text-neutral-600"}`} > MANUAL @@ -129,22 +129,19 @@ export function JourneyForm({ isOpen={showSettings} className="mb-8" > -
+
-
-
+
onWorkMinutesChange(parseDuration(duration)) } - className="h-12 4k:h-24 rounded-xl text-center text-lg font-bold focus-visible:ring-emerald-500" + className="h-12 rounded-xl text-center text-lg font-bold focus-visible:ring-emerald-500" />
-
+
-
+
-