Skip to content

[UI-REWRITE]: The design system's text-sm is 13px where Tailwind's is 14px, so the token is unusable #6972

Description

@a-effort

The type step the design system calls text-sm is 13px with a 16px line height. Tailwind's built-in text-sm is 14px. The token cannot be used for that step, so feature code writes the pixel value by hand: text-[13px] appears 58 times across 21 files in src/components, part of 109 arbitrary pixel type sizes.

The primitives never worked around it. text-[13px] appears zero times in src/components/ui, where text-sm is used 61 times. One step is spelled two ways depending on which layer the code sits in, and the primitives are likely a pixel larger than the design intends wherever that step applies.

The project has already done this for a neighbouring step. index.css:53-55 defines --text-xxs: 10px with --text-xxs--line-height: 16px and the comment "Figma's text-xxs step, below Tailwind's built-in scale". The mechanism is the same here, except this one overrides a built-in rather than adding below it.

Proposed change. Set --text-sm: 13px and --text-sm--line-height: 16px in the @theme inline block, then replace text-[13px] with text-sm at the call sites. Where a call site pairs it with leading-4, that becomes redundant and goes too.

Verify before doing any of it. The evidence so far is a single text layer in one frame. Redefining the token moves all 296 text-sm uses from 14px to 13px, primitives included, so a button label, an input value and a table cell should be checked in Figma first. If any of those are 14px, the token cannot simply be redefined and the 13px step needs its own name.

Scope is the web UI only, no API change, and no work on the Admin UI. Text at this step changes size across the app.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreLinting, formatting, dependency hygiene, or project maintenance chorestriageIssues / Features awaiting triageui-rewriteTasks for the isolated ui rewrite feature branch

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions