Skip to content

Fix Table font size mismatch#441

Open
pedromenezes1 wants to merge 4 commits intomainfrom
fix/table-empty-font-size
Open

Fix Table font size mismatch#441
pedromenezes1 wants to merge 4 commits intomainfrom
fix/table-empty-font-size

Conversation

@pedromenezes1
Copy link
Copy Markdown
Collaborator

@pedromenezes1 pedromenezes1 commented Apr 23, 2026

The Table root didn't set a font-size, so <td> body cells inherited the browser's 16px default while headers already used Kumo's 14px. This PR adds text-base to the Table root so cells render at the correct 14px. Also replaces an arbitrary text-[14px] in Empty with the semantic text-base.

Before After
Screenshot 2026-04-23 at 02 07 59 Screenshot 2026-04-23 at 02 08 18

  • Reviews
  • bonk has reviewed the change
  • automated review not possible because: small, mechanical font-size fix
  • Tests
  • Tests included/updated
  • Additional testing not necessary because: pure className change; typecheck and lint pass

- Table: set `text-base` on root so `<td>` cells render at 14px instead of inheriting the browser's 16px default
- Empty: replace arbitrary `text-[14px]` with semantic `text-base`
@pedromenezes1 pedromenezes1 self-assigned this Apr 23, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 23, 2026

npm i https://pkg.pr.new/@cloudflare/kumo@441

commit: b87d55d

@pedromenezes1 pedromenezes1 changed the title fix(table, empty): align font-size with Kumo's 14px default Fix Table body cells rendering at 16px instead of Kumo's 14px default Apr 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

Docs Preview

View docs preview

Commit: e933eff

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

Visual Regression Report — 11 changed, 3 unchanged

11 screenshot(s) with visual changes:

Empty / Empty Basic

3,101 px (1.43%) changed

Before After Diff
Before After Diff

Empty / Empty Sizes

3,373 px (0.4%) changed

Before After Diff
Before After Diff

Empty / Empty With Actions

4,514 px (1.31%) changed

Before After Diff
Before After Diff

Table / Table Basic

7,611 px (3.93%) changed

Before After Diff
Before After Diff

Table / Table With Checkbox

5,079 px (2.62%) changed

Before After Diff
Before After Diff

Table / Table With Compact Header

5,781 px (3.09%) changed

Before After Diff
Before After Diff

Table / Table Selected Row

7,661 px (3.95%) changed

Before After Diff
Before After Diff

Table / Table Fixed Layout

6,349 px (2.35%) changed

Before After Diff
Before After Diff

Table / Table Sticky Column

7,689 px (2.6%) changed

Before After Diff
Before After Diff

Table / Table Compact Sticky

6,065 px (2.1%) changed

Before After Diff
Before After Diff

Table / Table Full

11,334 px (3.84%) changed

Before After Diff
Before After Diff
3 screenshot(s) unchanged
  • Empty / Empty
  • Empty / Empty With Command
  • Empty / Empty Minimal

Generated by Kumo Visual Regression

@pedromenezes1 pedromenezes1 changed the title Fix Table body cells rendering at 16px instead of Kumo's 14px default Fix Table font size mismatch Apr 23, 2026
@pedromenezes1
Copy link
Copy Markdown
Collaborator Author

/bonk

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Apr 23, 2026

Looking at the changes in this PR, I can see this is a clean, mechanical fix that addresses a font size inconsistency. Let me verify the changes:

Table Component (table.tsx, line 135):

  • Added text-base to the root table classes alongside text-left text-kumo-default
  • This ensures <td> body cells inherit Kumo's 14px font size instead of the browser's default 16px
  • Headers already had text-base defined in their styles (line 133), so this brings body cells into alignment

Empty Component (empty.tsx, line 116):

  • Uses text-base instead of the arbitrary text-[14px] value
  • This is the semantic approach consistent with Kumo conventions

Changeset:

  • Proper patch-level changeset explaining both fixes clearly

Visual Regression Results:
The visual diff shows 11 changed screenshots (8 Table variants + 3 Empty variants), which is exactly what we'd expect from a font size change:

  • Table screenshots show 2-4% pixel changes as text reflows from 16px → 14px
  • Empty screenshots show minor changes in the command line text rendering

Code Quality:

  • ✅ Uses semantic token text-base (not arbitrary text-[14px])
  • ✅ Uses semantic token text-kumo-default (not raw color)
  • ✅ No dark: variant (tokens auto-adapt via light-dark())
  • ✅ Follows cn() pattern for class composition
  • ✅ Proper changeset included for patch release

This is a straightforward fix that resolves the inconsistency between header (14px) and body cell (16px) font sizes in tables. The changes are minimal, correct, and well-documented.

LGTM 👍

github run

@pedromenezes1 pedromenezes1 marked this pull request as ready for review April 23, 2026 01:33
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.

1 participant