-
Notifications
You must be signed in to change notification settings - Fork 334
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
Refactor monospace font sizes to use CSS variables for consistency #2063
Conversation
📦 Docs artifacts are ready: https://github.com/elixir-lang/ex_doc/actions/runs/12935597239/artifacts/2476418925 |
Which OS are you using? It turns out Inconsolata was smaller than usual (or the one for macOS is larger than usual), so I picked the font sizes that precisely matched the previous font, by comparing the texts side by side. In any case, I compared your screenshot with https://hexdocs.pm/ex_doc and it is clear that it is increasing the text in most places. I am also almost sure that GitHub uses 12px for inline code, so I don't think it is a general agreement that it has to be at least 14px. |
Github uses a larger size in markdown code snippets than it does in code files. |
introduced a font size xs variant if you wish to use it |
I compared screenshot because I don't know what is your OS. But locally I compared the builds and I also confirmed the sizes are considerably bigger.
If you inspect |
I use windows, macos, and ubuntu btw. screenshot is from macos |
Given the above, the goal is to keep those changes as is for now. Thank you. |
that's because gh uses 14px for regular comment text while we use 16px @josevalim i believe you've missed this, so the correct size for code is 14px in our case |
We are using 13px for inline code which looks good with 16px, no further changes planned on this. Thanks. |
Replace hardcoded font sizes with CSS variables to ensure consistency across the application. Introduce a new variable for small text size.
I've also noticed monospace text became too small in some places when @josevalim tried to compensate for the larger system monospace font rendering in 70acb0d#diff-ff486ec25148e539aaaedfe186ecf1c05b629ff7fe07e5c26040a65eb4193bc0 so this brings the font sizes back to a normal level consistent with the rest of the website, going below 14px is bad for legibility
0.875rem
is equivalent to 14px https://v3.tailwindcss.com/docs/font-sizeresult