Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix(to-tailwind): borderWidth={1} emits bare border, not dangling border-#4125

Open
natew wants to merge 3 commits into
v3-betatamagui/tamagui:v3-betafrom
fix/to-tailwind-border-width-1tamagui/tamagui:fix/to-tailwind-border-width-1Copy head branch name to clipboard
Open

fix(to-tailwind): borderWidth={1} emits bare border, not dangling border-#4125
natew wants to merge 3 commits into
v3-betatamagui/tamagui:v3-betafrom
fix/to-tailwind-border-width-1tamagui/tamagui:fix/to-tailwind-border-width-1Copy head branch name to clipboard

Conversation

@natew

@natew natew commented Jul 11, 2026

Copy link
Copy Markdown
Member

what

The @tamagui/to-tailwind converter emitted a dangling border- class for
borderWidth={1} (Tailwind's border = 1px). Root cause: transform.ts
propValueToClass joins ${prefix}-${tailwindValue}, and the 1px case returns
an empty tailwindValue, producing border- instead of the bare border.

reproduction (before)

<View borderWidth={1} />                          => className="border-"
<View borderWidth={1} borderColor="$borderColor" /> => className="border- border-borderColor"

after

<View borderWidth={1} />                          => className="border"
<View borderWidth={1} borderColor="$borderColor" /> => className="border border-borderColor"
<View borderWidth={2} />                          => className="border-2"   (unchanged)

fix

When tailwindValue is empty, emit the bare prefix (the prefix itself is the
class) instead of ${prefix}-.

proof

  • Added a regression test asserting border border-borderColor and no dangling
    border-.
  • @tamagui/to-tailwind test:web: 40/40 pass.

context

Surfaced while converting Soot's templates/app to Tailwind against the v3
beta: across all 70 template .tsx, this was the sole source of dangling
classes; with the fix, the bulk codemod produces zero dangling classes.

@railway-app
railway-app Bot temporarily deployed to tamagui / tamagui-pr-4125 July 11, 2026 23:37 Destroyed
@railway-app

railway-app Bot commented Jul 11, 2026

Copy link
Copy Markdown

🚅 Deployed to the tamagui-pr-4125 environment in tamagui

Service Status Web Updated (UTC)
tamagui ✅ Success (View Logs) Web Jul 12, 2026 at 1:28 am

@railway-app
railway-app Bot temporarily deployed to tamagui / tamagui-pr-4125 July 12, 2026 01:16 Destroyed
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.