From b3831d5dbead72f38436e9947e8399f3be5a254a Mon Sep 17 00:00:00 2001 From: Alex Carpenter Date: Fri, 31 Oct 2025 11:28:11 -0400 Subject: [PATCH 1/2] fix(clerk-js): Variable line-height discrepancy --- .../clerk-js/src/ui/foundations/typography.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/clerk-js/src/ui/foundations/typography.ts b/packages/clerk-js/src/ui/foundations/typography.ts index 6528d346cc5..9b923480db0 100644 --- a/packages/clerk-js/src/ui/foundations/typography.ts +++ b/packages/clerk-js/src/ui/foundations/typography.ts @@ -9,10 +9,10 @@ const fontWeights = Object.freeze({ const lineHeights = Object.freeze({ normal: 'normal', - extraSmall: '1.33333', - small: '1.38462', - medium: '1.41176', - large: '1.45455', + extraSmall: '16 / 12', // = 1.33333 + small: '18 / 13', // = 1.38462 + medium: '24 / 17', // = 1.41176 + large: '16 / 11', // = 1.45455 } as const); const letterSpacings = Object.freeze({ @@ -20,11 +20,11 @@ const letterSpacings = Object.freeze({ } as const); export const FONT_SIZE_SCALE_RATIOS = Object.freeze({ - xs: '11 / 13', // 0.846154 - sm: '12 / 13', // 0.923077 - md: '1', // 1.0 - lg: '17 / 13', // 1.307692 - xl: '24 / 13', // 1.846154 + xs: '11 / 13', // = 0.846154 + sm: '12 / 13', // = 0.923077 + md: '1', // = 1.0 + lg: '17 / 13', // = 1.307692 + xl: '24 / 13', // = 1.846154 } as const); export type FontSizeKey = keyof typeof FONT_SIZE_SCALE_RATIOS; From 45f5c10b63ce50c3c168dcadf60a509f8d838176 Mon Sep 17 00:00:00 2001 From: Alex Carpenter Date: Fri, 31 Oct 2025 11:31:22 -0400 Subject: [PATCH 2/2] add changeset --- .changeset/twenty-sides-take.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/twenty-sides-take.md diff --git a/.changeset/twenty-sides-take.md b/.changeset/twenty-sides-take.md new file mode 100644 index 00000000000..4727a688d20 --- /dev/null +++ b/.changeset/twenty-sides-take.md @@ -0,0 +1,5 @@ +--- +'@clerk/clerk-js': patch +--- + +Updates line-height calculations to follow font-sizing to fix differences across browsers.