From 071efaf2dfb2d077e5e60193f083676ec726cba6 Mon Sep 17 00:00:00 2001
From: Eric Bailey <git@esb.lol>
Date: Fri, 9 Feb 2024 12:04:04 -0600
Subject: Round line height (#2824)

* Round line height

* Add to existing
---
 src/components/Typography.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/components/Typography.tsx')

diff --git a/src/components/Typography.tsx b/src/components/Typography.tsx
index 8136b5ef3..b34f51018 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
-- 
cgit 1.4.1

