Skip to content

Commit

Permalink
fix(switch): Change lineHeight from "normal" to 0 to remove a few ext…
Browse files Browse the repository at this point in the history
…ra pixels in … (#5500)

* 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 <tim@kolberger.eu>
  • Loading branch information
kk21 and TimKolberger authored Feb 5, 2022
1 parent e84b477 commit c5eb9c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/breezy-bananas-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@chakra-ui/switch": patch
---

Fixed an UI issue where the Switch component rendered a few pixels off the baseline.
2 changes: 1 addition & 1 deletion packages/switch/src/switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const Switch = forwardRef<SwitchProps, "input">((props, ref) => {
display: "inline-block",
position: "relative",
verticalAlign: "middle",
lineHeight: "normal",
lineHeight: 0,
...styles.container,
}),
[styles.container],
Expand Down

1 comment on commit c5eb9c0

@vercel
Copy link

@vercel vercel bot commented on c5eb9c0 Feb 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.