question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Broken vertical font alignment on certain Linux distributions

See original GitHub issue

Bug report

Describe the bug

Text which is supposed to be centered vertically is off by a few pixels in Firefox on Fedora 33. This happens on both v1 and v0 and for every UI element where text is used.

To reproduce

  1. Get a working installation of Fedora 33 (VM, live USB stick, etc.)
  2. In Firefox, open one of the urls mentioned below
  3. See how the font is not aligned properly

Minimal reproduction

The official Chakra UI docs are by nature a minimal reproduction. See below for links. 😃

Update: This is no longer the case as the docs now use the non-default Inter font.

Expected behavior

I would expect the vertical alignment of text to be pixel perfect.

Screenshots

v1 screenshots

https://next.chakra-ui.com/docs/form/button

buttons image buttons loading indicator

https://next.chakra-ui.com/docs/data-display/badge

badges

https://next.chakra-ui.com/docs/form/input

inputs

v0 screenshot

https://chakra-ui.com/button:

grafik

System information

  • OS: Fedora 33 (Linux)
  • Browser: Firefox 84.0 (64 bit)
  • Version of @chakra-ui/core: 1.0.0-rc.5 / 0.8.0
  • Version of Node.js: N/A

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:29 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
nikwencommented, Dec 26, 2020

By default, we use the same font stack as GitHub: https://markdotto.com/2018/02/07/github-system-fonts/#the-stack

This explains why I am seeing the exact same issue on GitHub:

Screenshot

3reactions
wutangpaulcommented, Jan 30, 2021

Experiencing same issue on Firefox. Definitely coming from the github font stack. Seeing the same issue on buttons here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Font misaligned vertically / Newbie Corner / Arch Linux Forums
Dirty fix is of course to align it in source code of dwm, but that doesn't really work for everything mentioned above, and...
Read more >
(nevermind) It seems most Linux distributions are shipping a ...
(nevermind) It seems most Linux distributions are shipping a broken Nimbus font (Helvetica substitution) and it's causing a lot of problems.
Read more >
vertical-align - CSS: Cascading Style Sheets - MDN Web Docs
The vertical-align property can be used in two contexts: To vertically align an inline element's box inside its containing line box.
Read more >
Why I vertically align my code (and you should too!)
Some heretical scum will tell you that proportional fonts are the best ... Linux Kernel where vertical alignment is used to make code...
Read more >
conky - How to align text in the middle of two ${hr}s?
You can pull off something close to what you want like this... ${alignc}Some Text ${color green}${voffset -25}______${alignr}______.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found