Skip to content

Type on Tailwind's whole-pixel scale: text-sm 14px, text-xs 12px, titles 24px - #2698

Merged
samjulien merged 6 commits into
mainfrom
claude/type-scale-whole-pixels-ea38a6
Dec 2, 2026
Merged

samjulien merged 6 commits into
mainfrom
claude/type-scale-whole-pixels-ea38a6

Conversation

@samjulien

@samjulien samjulien commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

The design-system change agreed with Sam after the design audit: text moves to Tailwind's own type scale, in whole pixels, in the web app and in OpenBot Desktop's setup window. This PR is the type scale only. The line under a row's name is in its own draft PR, #2721.

This changes what #2124 kept, on purpose

#2124 ("A sharper look") kept every size on purpose: "Kept on purpose: the sidebar strip, every size, …". This PR changes that one decision, for type only. Spacing, heights, radii, icons and the conversation size stay as they are. The look's text and the docs now say how a size changes: with its scale, for every screen at once, agreed first. @guidovizoso, this is the part for you to review. Nothing else that landed in #2124 or since is undone here.

Why

theme.css set every --text-* step to Tailwind's default times 15/16. Each size was a fraction of a pixel, and everyday text (rows, names, fields, table cells) was smaller than in ChatGPT, Claude and Grok, which use 14–15px. The root was already 16px; only type was scaled. This PR removes the 15/16 steps, so each text-* class means what it means in Tailwind and shadcn.

The scale

Class Before After Used for
text-xs 11.25px 12px Labels, times, counts, the line under a row's name
text-sm 13.125px 14px Controls, rows, names, fields
text-base 15px 16px Body text with no class
text-lg 16.875px 18px
text-xl 18.75px 20px
text-2xl 22.5px 24px Page titles
text-3xl 28.125px 30px
text-4xl 33.75px 36px
text-conversation 16px 16px Not changed here. #2634 makes it 15px.

Weights do not change. Line heights are Tailwind's own, as before.

UI text and conversation text

What changed

  1. app/src/theme.css. The 15/16 overrides are gone. --text-conversation stays as it is on main.
  2. OpenBot Desktop's setup window (desktop/src/styles.css) had its own copy of the 15/16 scale. It now uses the same whole-pixel steps, so setup and the app match. At 16px the Docker Desktop hand-off needs a fifth line in the smallest window (720 × 560), so the Start page holds five lines there instead of four (setup-page-first.css, min-height: 5lh). The setup window's layout test passes all 279 cases with it.
  3. Row height. A title over a one-line description is 67px (was 65px). A single line is still held at the 56px floor. The layout skill and the comments that stated 65px say 67px.
  4. Docs.
    • "The look" › Type in docs/app-guidelines.md names the new sizes.
    • "Sizes stay" in the look and in design-system.md's "No pixel value" bullet now say how a size changes: only with its scale, for every screen at once, agreed first.
    • design-system.md says the type scale and the spacing grid are Tailwind's own. They are no longer "in theme.css".
    • The layout skill's Units section no longer describes the 15/16 scale.

Layout check

I checked the workbench at 1280 × 820 and at 390px wide, in light and dark, under the default look and each skin (OpenDots, OpenDuet, OpenFuse). The screens were Settings, Bots, Apps, Skills and Home. I also checked the setup window's Start and update pages at 720 × 560. No screen scrolls sideways, and nothing clips in the sidebars, rows, buttons or the message box.

The macOS window buttons over "Back to app" in the Settings shots are a workbench bug on main: Trusted Types blocks its page scripts. The polish-ui-bugs PR fixes it. Real Desktop is not affected.

Settings, light

Settings, light, before and after

Bots, dark

Bots, dark, before and after

Apps, light

Apps, light, before and after

Phone width, light (top row before, bottom row after)

Settings, Bots, Apps, Skills and Home at 390px, before and after

Skins

OpenDots, Apps:

OpenDots Apps, before and after

OpenDuet, Skills:

OpenDuet Skills, before and after

OpenFuse at 390px, dark (top before, bottom after):

OpenFuse at 390px, dark, before and after

OpenBot Desktop's setup window, 720 × 560

Setup, light, before and after

Update, dark, before and after

Tests

  • app/tests/artifacts-kit.test.ts: it asserted that text-sm compiles to 0.8203125rem. It now asserts text-sm reads var(--text-sm) and --text-sm is 0.875rem. The rule it holds is the same.
  • app/tests/skins-window-buttons.test.tsx: the update banner's text is centred in its 28px row. At 14px on a 20px line it starts 1px higher in OpenDuet and OpenFuse (y 11 → 10). The banner and its row have not moved.
  • desktop/src-tauri/src/first_paint.rs: the cover Windows draws before the setup page loads copies the page's first card. Its test checks that styles.css still has the sizes it copied. The cover now draws the h1 at 24px (was 22.5px) and the lede at 16px (was 15px), and the test reads the new tokens.
  • Comments only: ui-look-guard.test.ts, conversation-row-text.test.ts and connect-your-ai.test.tsx gave the old sizes. No assertion changed and no allowlist grew.
  • conversation-row-text.test.ts: this PR keeps its rule, that a line at the title's size loses a row's hierarchy. The conversation row keeps its 12px line, and no second line moves to the title's size here.

Run locally:

  • The app's token and look tests, artifacts-kit, skins-window-buttons (Chromium and WebKit) and every test that reads a changed file.
  • Desktop: setupLayout.browser.test.ts (279 pass), the CSS unit tests (145 pass) and the first_paint Rust tests.
  • tsc in app/ and desktop/, and Biome lint and format on the changed files.

Not in this PR

Changelog

The web app.

  • Text is larger and on whole pixels. The type scale was 15/16 of Tailwind's, so every size
    was a fraction of a pixel. It is now Tailwind's own: rows, names and fields are 14px (were
    13.125px), labels, times and counts 12px (were 11.25px), body text 16px and page titles 24px.
    A row with a description is 2px taller. A conversation's messages keep their size.

OpenBot Desktop.

  • The setup window's text is on the same whole-pixel scale as the app. On the smallest window,
    Docker Desktop's directions get a fifth line instead of being held to four.

davidmckayv
davidmckayv previously approved these changes Dec 2, 2026

@davidmckayv davidmckayv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Nothing overflows or clips at 390px, at Desktop's 1000x800 window, or under the desktop host. Taste note only: with 14px descriptions, the two-line clamp cuts some Settings descriptions at 390px. Conflicts with #2701 in page-parts.tsx, ui/item.tsx and the layout skill; the docs' row heights (71px vs 53px, really about 60px) need reconciling by whichever lands second.

@samjulien

Copy link
Copy Markdown
Collaborator Author

Closing: we're keeping the sizes Guido set in #2124.

@samjulien samjulien closed this Dec 2, 2026
@samjulien

Copy link
Copy Markdown
Collaborator Author

Reopened: closed by mistake.

…les 24px

theme.css set every --text-* step to Tailwind's default times 15/16, so each size was a fraction of
a pixel: text-sm 13.125px, text-xs 11.25px, a page title 22.5px. The steps are now Tailwind's own:
text-xs 12px, text-sm 14px, text-base 16px, text-2xl 24px. --text-conversation stays as it is.

The line under a row's name (ItemDescription) is text-sm in muted-foreground, the name's size, as
in shadcn. Three screens that forced it back to text-xs no longer do. Rows with a description are
71px, 6px taller than before.

The look's type rule, the layout skill and the comments that stated the old sizes say the new
ones. The artifacts kit test reads text-sm from Tailwind's own --text-sm.
The banner's line is text-sm, centred in its 28px row. At 14px on a 20px line (was 13.125px on
18.75px) its top lands at 10px instead of 11px in OpenDuet and OpenFuse. The banner and its row
are where they were, so only the measured baseline changes.
…w sizes change

The line under a row's name (ItemDescription) and the three screens that set it moved to their
own pull request, so this one is the type scale alone. A title over a one-line description is
67px on the new scale (was 65px).

OpenBot Desktop's setup window had its own copy of the 15/16 scale. It now uses Tailwind's
whole-pixel steps too, so setup and the app match. At 16px the Docker Desktop hand-off needs a
fifth line at the smallest window (720x560), so the page holds five lines there instead of four.

"Sizes stay" in the look and in design-system.md now says how a size changes: only with its
scale, for every screen at once, agreed first.
davidmckayv
davidmckayv previously approved these changes Dec 2, 2026

@davidmckayv davidmckayv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approved: since my last approval this push only merges main and drops the CHANGELOG.md edit (the note is in the description). Nothing else changed.

…line at 16px

The cover Windows draws before the setup page loads copies the page's first card, and its test
checks styles.css still has the sizes it copied. On the whole-pixel scale the h1 is 24px (was
22.5px) at 1.3 and the lede 16px (was 15px), so the cover now draws them at those sizes.

@davidmckayv davidmckayv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approved at 3c7bfbc. The new commit only brings Windows' first-paint cover into line with this PR's type scale (h1 24px at 1.3, lede 16px), and its test pins the copied tokens and the sheet's sizes. Nothing else changed.

@samjulien
samjulien added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit 1067ac4 Dec 2, 2026
53 checks passed
@samjulien
samjulien deleted the claude/type-scale-whole-pixels-ea38a6 branch December 2, 2026 04:05
guidovizoso added a commit that referenced this pull request Dec 2, 2026
theme.css: main's whole-pixel type scale (#2698), with the conversation at 15px and the message
box at 16px on a touch screen. CHANGELOG: this branch's lines move to Unreleased, since 1.2.6 and
1.2.7 have shipped, and the 15px line no longer says it matches the app's other text.
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