On Monday, 23 May 2016 at 06:33:15 UTC, Jacob Carlborg wrote:
The styling of [1] is a bit inconsistent. The styling for inline code, i.e. <code>, seem to have bigger font than both the regular text and the larger code blocks, <pre class="code">.


[1] http://code.dlang.org/package-format?lang=json

Mixing fonts is hard. Both fonts must have the same size, but also the same x-height [0], which is the height of lowercase letters like x. This can be seen very clearly with inline code like "contain a <code>dub.json</code>" at the page you linked to. Zoom in (Ctrl+) and you see the height difference between "a" and "u".

On websites where fonts are picked from whatever is available on the system, this is nearly impossible to get right. You either live with it or embed your own fonts via CSS, which bloats the page.

[0] https://en.wikipedia.org/wiki/X-height

Reply via email to