Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define font-family fallback in design tokens package #155

Open
germain-gg opened this issue Jun 30, 2023 · 1 comment
Open

Define font-family fallback in design tokens package #155

germain-gg opened this issue Jun 30, 2023 · 1 comment

Comments

@germain-gg
Copy link
Contributor

germain-gg commented Jun 30, 2023

To fix matrix-org/matrix-react-sdk#11170

@sandhose
Copy link
Member

sandhose commented Oct 27, 2023

Oh, I opened an issue for this yesterday without looking for existing ones

The current fonts (sans and mono) are set to a single font (Inter and Inconsolata), which we make the client download.
We include those fonts with a font-display: swap property, which makes the UI display not block on the font to display stuff (good), but because they are the only font in the stack, the initial font is serif (not good).

For example, in MAS, we get this UI while the font gets loaded:

Initial load After few ms
image image

We should at least have sans-serif in the font stack, but even better would be:

  • Inter, ui-sans-serif, system-ui, sans-serif for the sans font
  • Inconsolata, ui-monospace, monospace for the mono font

We could also go further and use the font stacks described in this article

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants