From c5eb9c03cd6925f8624ba48a406205d64000a2d1 Mon Sep 17 00:00:00 2001 From: kk21 Date: Sat, 5 Feb 2022 23:21:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(switch):=20Change=20lineHeight=20from=20"no?= =?UTF-8?q?rmal"=20to=200=20to=20remove=20a=20few=20extra=20pixels=20in=20?= =?UTF-8?q?=E2=80=A6=20(#5500)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Change lineHeight from "normal" to 0 to remove a few extra pixels in height at the bottom. * chore: add changeset Co-authored-by: Tim Kolberger --- .changeset/breezy-bananas-sell.md | 5 +++++ packages/switch/src/switch.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/breezy-bananas-sell.md diff --git a/.changeset/breezy-bananas-sell.md b/.changeset/breezy-bananas-sell.md new file mode 100644 index 00000000000..c24c7bbb084 --- /dev/null +++ b/.changeset/breezy-bananas-sell.md @@ -0,0 +1,5 @@ +--- +"@chakra-ui/switch": patch +--- + +Fixed an UI issue where the Switch component rendered a few pixels off the baseline. diff --git a/packages/switch/src/switch.tsx b/packages/switch/src/switch.tsx index 2390ab5d5f9..0f1a08abeff 100644 --- a/packages/switch/src/switch.tsx +++ b/packages/switch/src/switch.tsx @@ -42,7 +42,7 @@ export const Switch = forwardRef((props, ref) => { display: "inline-block", position: "relative", verticalAlign: "middle", - lineHeight: "normal", + lineHeight: 0, ...styles.container, }), [styles.container],