Skip to content

fix(ui): rem type scale so text is readable and follows browser font settings - #4

Merged
estebanstifli merged 3 commits into
estebanstifli:mainfrom
sebinbenjamin:fix/readable-ui-text
Nov 4, 2026
Merged

estebanstifli merged 3 commits into
estebanstifli:mainfrom
sebinbenjamin:fix/readable-ui-text

Conversation

@sebinbenjamin

@sebinbenjamin sebinbenjamin commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Many labels, captions and status values used hard-coded 6–9px font sizes. They are hard to read at normal zoom, and because they are in px they ignore the browser's default font-size setting. This PR replaces every px font size with a rem type scale, so the smallest text is 11px at the default setting and grows when the user picks a larger font in browser settings.

:root {
  --text-2xs: .6875rem;  /* 11px: badges, uppercase micro labels */
  --text-xs: .75rem;     /* 12px: labels, metadata, captions */
  --text-sm: .8125rem;   /* 13px: secondary text */
  --text-base: .875rem;  /* 14px: body and controls */
  --text-md: .9375rem;   /* 15px: emphasised body */
  --text-lg: 1.0625rem;  /* 17px: card and panel titles */
  --text-xl: 1.25rem;    /* 20px: section headings */
  --text-2xl: 1.5rem;    /* 24px: page headings */
  --text-3xl: 1.75rem;   /* 28px: hero numbers */
}

Old sizes map onto the scale like this. Neighbouring sizes share one step, so the same kind of text gets the same size:

Old size New size
6, 7, 7.5px --text-2xs (11px)
8, 8.5, 9, 10, 11, 12px --text-xs (12px)
13 / 14 / 15px --text-sm / --text-base / --text-md (unchanged)
16–19px --text-lg (17px)
20, 22px --text-xl (20px)
23–26px --text-2xl (24px)
28, 29px --text-3xl (28px)
40px and above, clamp() the same size in rem; clamp() bounds in rem, with a rem term in the middle value so zoom still scales it

Other changes:

  • Controls with a fixed height: the assistant scope select, context toggle and meeting/language selects use min-height, so larger text fits. The inline segment editor sets its height from 1lh (falling back to 30px) and uses a unitless line height.
  • GPU name overlap: in the Local AI status card, the GPU name was an inline <b>, so text-overflow: ellipsis never applied and long names ran into the free-VRAM value. It is now display: block, and the full name shows on hover (title attribute in app.js; the value already goes through escapeHTML).
  • Typography details: h1–h3 use text-wrap: balance, and timestamps use tabular numerals so they don't jitter.
  • Mobile: text-size-adjust: 100% stops mobile browsers enlarging text on their own. On touch screens, form fields are at least 16px, so iOS Safari doesn't zoom in when one gets focus.

Evidence

Windows 11, Chrome, dark theme, v0.9.0.

Before the change, visible text on the Transcription page used 7, 7.5, 8, 8.5, 9, 10 and 11px. After it, nothing is below 11px.

I checked Transcription, Meetings, Speakers, Prompt and Settings at 1440×900, 768×1024 and 390×844, each at the default text size and at 125% (the same as setting the browser's default font to 20px). A script looked for text cut off by overflow: hidden without an ellipsis, and for sideways page scroll; it found neither on any page. At 125%, the smallest text is 13.75px, which shows the browser setting is respected.

In the GPU row, the name used to overlap the value. It now ends at x=105.6 and the value starts at x=112.6.

  • Before:
    before
    After:
    after
    after settings

Merge Danger

Door: two-way

Stylesheets plus a one-attribute change in app.js. To revert, run git revert.

Blast Radius: layout

Text that was very small is now readable, so some tight boxes wrap to two lines: the sidebar subtitle and the "Local AI status" caption. A few sizes also moved slightly to fit the scale, for example 22px to 20px and 26px to 24px.

The 16px rule for form fields applies only on touch screens. It uses !important, because component rules set smaller field sizes with higher specificity.

I didn't check a live recording, a meeting page with real data, or the collapsed sidebar.

The zoom rule for screens 1800px and wider in ui-refresh.css is unchanged.

Many labels, captions and status values used hard-coded 6-9px font sizes, which are hard to read at normal zoom and ignore the browser's font-size preference. Remap sub-12px sizes to an 11px floor while keeping relative order (6-7.5px -> 11px, 8-8.5px -> 11.5px, 9-11px -> 12px). Sizes of 12px and above are unchanged.

The Local AI status GPU row put the device name in an inline <b>, so its text-overflow ellipsis never applied and long names (e.g. 'NVIDIA GeForce RTX 4050 Laptop GPU') ran into the free-VRAM value. Make it block-level so it truncates.
…settings

Replace every px font size with nine rem tokens (--text-2xs to --text-3xl) or a rem value, so the browser's default font size scales the UI. Neighbouring sizes collapse into one step per role.

Also: fixed-height controls use min-height so larger text fits; the inline segment editor sizes from 1lh; headings balance their lines; timestamps use tabular numerals; mobile text inflation is disabled; form fields on touch screens are at least 16px so iOS doesn't zoom on focus.
@sebinbenjamin sebinbenjamin changed the title fix(ui): raise minimum text size to 11px and stop GPU name overlapping fix(ui): rem type scale so text is readable and follows browser font settings Nov 3, 2026
@estebanstifli
estebanstifli merged commit b75077e into estebanstifli:main Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants