diff --git a/src/components/Typography.tsx b/src/components/Typography.tsx index 8136b5ef..b34f5101 100644 --- a/src/components/Typography.tsx +++ b/src/components/Typography.tsx @@ -15,7 +15,7 @@ export function leading< >(textSize: Size, leading: Leading) { const size = textSize?.fontSize || atoms.text_md.fontSize const lineHeight = leading?.lineHeight || atoms.leading_normal.lineHeight - return size * lineHeight + return Math.round(size * lineHeight) } /** @@ -32,7 +32,7 @@ function normalizeTextStyles(styles: TextStyle[]) { if (s?.lineHeight) { if (s.lineHeight <= 2) { - s.lineHeight = fontSize * s.lineHeight + s.lineHeight = Math.round(fontSize * s.lineHeight) } } else { s.lineHeight = fontSize diff --git a/src/lib/styles.ts b/src/lib/styles.ts index df9b4926..26312744 100644 --- a/src/lib/styles.ts +++ b/src/lib/styles.ts @@ -236,7 +236,7 @@ export function lh( height: number, ): TextStyle { return { - lineHeight: (theme.typography[type].fontSize || 16) * height, + lineHeight: Math.round((theme.typography[type].fontSize || 16) * height), } }