-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: tailwindlabs/tailwindcss
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3b6f2c2
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: tailwindlabs/tailwindcss
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 75bdb44
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 8 commits
- 9 files changed
- 1 contributor
Commits on May 26, 2025
-
Fix migrating
mt-[0px]to-mt-[0px]instead of the other way arou……nd (#18154) I was testing to upgrade tool on various random projects just to see how it behaves. Then I noticed an odd migration... This PR fixes an issue where the upgrade tool accidentally migrated classes such as `mt-[0px]` to `-mt-[0px]`. The reason for this is because we are trying to find a replacement, and the computed signature for both of them are exactly the same. - `mt-[0px]` translates to: ```css .x { margin-top: 0px; } ``` - `-mt-[0px]` translates to: ```css .x { margin-top: calc(0px * -1); } ``` Which in turn translates to ```css .x { margin-top: 0px; } ``` Notice that this is `0px`, not `-0px`. Internally we use the roots of functional utilities to find replacements. For intellisense purposes we typically show negative versions before positive versions. This then means that we will try `-mt-*` before `mt-*`. Because of the signature above, the `mt-[0px]` was translated into `-mt-[0px]`. We could solve this in a few ways. The first thing we can try is to make sure that the signature is not the same and that `-mt-[0px]` actually translates into `-0px` not `0px`. This would solve our problem of the accidental migration. However, if we _just_ sort the functional utilities roots such that the positive versions exist before negative version and rely on the fact that `-mt-[0px]` has the same signature. Then it also means that by doing that we can migrate `-mt-[0px]` into `mt-[0px]` which is even better because it's the same result and shorter. ## Test plan 1. Added a test to verify that `mt-[0px]` does not get migrated to `-mt-[0px]`. 2. Added a test to verify that `-mt-[0px]` does get migrated to `mt-[0px]`.
Configuration menu - View commit details
-
Copy full SHA for 5131237 - Browse repository at this point
Copy the full SHA 5131237View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e789f3 - Browse repository at this point
Copy the full SHA 0e789f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for f9d13b7 - Browse repository at this point
Copy the full SHA f9d13b7View commit details -
delay making
@tailwind utilitiesa context nodeIf we do this _before_ handling `@apply`, then we won't be able to find a `@tailwind utilities` at-rule.
Configuration menu - View commit details
-
Copy full SHA for 16d4ea5 - Browse repository at this point
Copy the full SHA 16d4ea5View commit details -
Configuration menu - View commit details
-
Copy full SHA for b35f713 - Browse repository at this point
Copy the full SHA b35f713View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6fbb431 - Browse repository at this point
Copy the full SHA 6fbb431View commit details -
Configuration menu - View commit details
-
Copy full SHA for 11adcbe - Browse repository at this point
Copy the full SHA 11adcbeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 75bdb44 - Browse repository at this point
Copy the full SHA 75bdb44View commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 3b6f2c2...75bdb44