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-#4125natew wants to merge 3 commits intov3-betatamagui/tamagui:v3-betafrom fix/to-tailwind-border-width-1tamagui/tamagui:fix/to-tailwind-border-width-1Copy head branch name to clipboard
border, not dangling border-#4125natew 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
|
🚅 Deployed to the tamagui-pr-4125 environment in tamagui
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
what
The
@tamagui/to-tailwindconverter emitted a danglingborder-class forborderWidth={1}(Tailwind'sborder= 1px). Root cause:transform.tspropValueToClassjoins${prefix}-${tailwindValue}, and the 1px case returnsan empty
tailwindValue, producingborder-instead of the bareborder.reproduction (before)
after
fix
When
tailwindValueis empty, emit the bareprefix(the prefix itself is theclass) instead of
${prefix}-.proof
border border-borderColorand no danglingborder-.@tamagui/to-tailwindtest:web: 40/40 pass.context
Surfaced while converting Soot's
templates/appto Tailwind against the v3beta: across all 70 template
.tsx, this was the sole source of danglingclasses; with the fix, the bulk codemod produces zero dangling classes.