-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Comparing changes
Open a pull request
base repository: tailwindlabs/tailwindcss
base: v4.1.6
head repository: tailwindlabs/tailwindcss
compare: v4.1.7
- 17 commits
- 69 files changed
- 6 contributors
Commits on May 9, 2025
-
Allow
_
before numbers during candidate extraction (#17961)This PR fixes a bug where a class like `header_1` wasn't properly extracted because we didn't allow an `_` before a number. This PR fixes that by allowing an `_` before a number. Fixes: #17960 ## Test plan 1. Added a test to verify this works 2. Existing tests work Used the visualizer tool for this to verify that the `header_1` class is being extracted: <img width="1816" alt="image" src="https://github.com/user-attachments/assets/fdc21602-0e2b-4e4e-92a1-19c4f4f5393f" />
Configuration menu - View commit details
-
Copy full SHA for 737994b - Browse repository at this point
Copy the full SHA 737994bView commit details -
Fix upgrade error when using
@import … source(…)
(#17963)This PR fixes an issue when running the upgrade tool and if any of the CSS files has an import that looks like this: ```css @import "tailwindcss" source("…"); ``` This was trying to resolve `tailwindcss" source("…` instead of `tailwindcss`. This PR fixes that. ## Test plan 1. Ran it locally on a project Before: <img width="1158" alt="image" src="https://github.com/user-attachments/assets/09bf5d69-797c-4330-ade1-edc213f7ce5c" /> After: <img width="1029" alt="image" src="https://github.com/user-attachments/assets/d1c9e194-30e2-4564-83c5-d9a259a67e90" />
Configuration menu - View commit details
-
Copy full SHA for 3386049 - Browse repository at this point
Copy the full SHA 3386049View commit details -
Prevent duplicate suggestions when using
@theme
and@utility
toge……ther (#17675) Fixes tailwindlabs/tailwindcss-intellisense#1313 Right now given this CSS: ```css @theme reference { --text-header: 1.5rem; } @Utility text-header { text-transform: uppercase; } ``` You'll see two entries for `text-header` in IntelliSense completions but we only want you to see one. This PR solves this by merging their modifier lists and de-duping by class name.
Configuration menu - View commit details
-
Copy full SHA for f0986ce - Browse repository at this point
Copy the full SHA f0986ceView commit details
Commits on May 10, 2025
-
Update dedent 1.5.3 → 1.6.0 (minor) (#17965)
Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request. ### What changed? #### ✳️ dedent (1.5.3 → 1.6.0) · [Repo](https://github.com/dmnd/dedent) · [Changelog](https://github.com/dmnd/dedent/blob/main/CHANGELOG.md) <details> <summary>Release Notes</summary> <h4><a href="https://github.com/dmnd/dedent/releases/tag/v1.6.0">1.6.0</a></h4> <blockquote><h2 dir="auto">What's Changed</h2> <ul dir="auto"> <li>feat: add <code class="notranslate">trimWhitespace</code> option by <a href="https://bounce.depfu.com/github.com/43081j">@43081j</a> in <a href="https://bounce.depfu.com/github.com/dmnd/dedent/pull/97">#97</a> </li> </ul> <h2 dir="auto">New Contributors</h2> <ul dir="auto"> <li> <a href="https://bounce.depfu.com/github.com/43081j">@43081j</a> made their first contribution in <a href="https://bounce.depfu.com/github.com/dmnd/dedent/pull/97">#97</a> </li> </ul> <p dir="auto"><strong>Full Changelog</strong>: <a href="https://bounce.depfu.com/github.com/dmnd/dedent/compare/v1.5.3...v1.6.0"><tt>v1.5.3...v1.6.0</tt></a></p></blockquote> <p><em>Does any of this look wrong? <a href="https://depfu.com/packages/npm/dedent/feedback">Please let us know.</a></em></p> </details> <details> <summary>Commits</summary> <p><a href="https://github.com/dmnd/dedent/compare/90644fe0be6ed6c159efe8c905f491ba26c51c35...ab2ce25762a6ad0c26c563075f87c74427092d02">See the full diff on Github</a>. The new version differs by 2 commits:</p> <ul> <li><a href="https://github.com/dmnd/dedent/commit/ab2ce25762a6ad0c26c563075f87c74427092d02"><code>1.6.0 (#98)</code></a></li> <li><a href="https://github.com/dmnd/dedent/commit/86902f7c97f32e91e5a9c2c6982a73a8a4a32b67"><code>feat: add `trimWhitespace` option (#97)</code></a></li> </ul> </details> ---  [Depfu](https://depfu.com) will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with `@depfu rebase`. <details><summary>All Depfu comment commands</summary> <blockquote><dl> <dt>@depfu rebase</dt><dd>Rebases against your default branch and redoes this update</dd> <dt>@depfu recreate</dt><dd>Recreates this PR, overwriting any edits that you've made to it</dd> <dt>@depfu merge</dt><dd>Merges this PR once your tests are passing and conflicts are resolved</dd> <dt>@depfu cancel merge</dt><dd>Cancels automatic merging of this PR</dd> <dt>@depfu close</dt><dd>Closes this PR and deletes the branch</dd> <dt>@depfu reopen</dt><dd>Restores the branch and reopens this PR (if it's closed)</dd> <dt>@depfu pause</dt><dd>Ignores all future updates for this dependency and closes this PR</dd> <dt>@depfu pause [minor|major]</dt><dd>Ignores all future minor/major updates for this dependency and closes this PR</dd> <dt>@depfu resume</dt><dd>Future versions of this dependency will create PRs again (leaves this PR as is)</dd> </dl></blockquote> </details> Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 0d975f5 - Browse repository at this point
Copy the full SHA 0d975f5View commit details
Commits on May 12, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 19e2b29 - Browse repository at this point
Copy the full SHA 19e2b29View commit details -
Add ignore pattern for node_modules in globby search in upgrade cli (#…
…17969) When passing `gitignore: true` to globby it will start a search for all .gitignore files, this initial search includes node_modules making it hang forever for large monorepos with many files inside node_modules
Configuration menu - View commit details
-
Copy full SHA for 5688f0a - Browse repository at this point
Copy the full SHA 5688f0aView commit details -
Configuration menu - View commit details
-
Copy full SHA for ba944ca - Browse repository at this point
Copy the full SHA ba944caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4fba87b - Browse repository at this point
Copy the full SHA 4fba87bView commit details
Commits on May 13, 2025
-
Upgrade: Migrate
outline
class (#17996)This PR adds a migration from `outline` to `outline-solid` for the v3 -> v4 upgrade tool. ## Test plan - Added integration test
Configuration menu - View commit details
-
Copy full SHA for ef2e6c7 - Browse repository at this point
Copy the full SHA ef2e6c7View commit details -
Migrate bare values to named values (#18000)
This PR improves the upgrade tool by also migrating bare values to named values defined in the `@theme`. Recently we shipped some updates dat allowed us to migrate arbitrary values (with square brackets), but we didn't migrate bare values yet. That means that in this example: ```html <div class="aspect-[16/9]"></div> <div class="aspect-16/9"></div> ``` We migrated this to: ```html <div class="aspect-video"></div> <div class="aspect-16/9"></div> ``` With this change, we will also try and migrate the bare value to a named value. So this example: ```html <div class="aspect-[16/9]"></div> <div class="aspect-16/9"></div> ``` Now becomes: ```html <div class="aspect-video"></div> <div class="aspect-video"></div> ``` ## Test plan 1. Added unit tests for the new functionality. 2. Ran this on a local project Before: <img width="432" alt="image" src="https://github.com/user-attachments/assets/ce1adfbd-7be1-4062-bea5-66368f748e44" /> After: <img width="382" alt="image" src="https://github.com/user-attachments/assets/a385c94c-4e4c-4e1c-ac73-680c56ac4081" />
Configuration menu - View commit details
-
Copy full SHA for 498f9ff - Browse repository at this point
Copy the full SHA 498f9ffView commit details
Commits on May 14, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 4db711d - Browse repository at this point
Copy the full SHA 4db711dView commit details -
Change casing of utilities with named values to kebab-case to match u… (
Configuration menu - View commit details
-
Copy full SHA for e57a2f5 - Browse repository at this point
Copy the full SHA e57a2f5View commit details
Commits on May 15, 2025
-
Ignore custom variants with
:merge(…)
selectors (#18020)Closes #15617 ## Summary This PR ignores `addVariant(…)` legacy JS plugin calls for variants that are using the [`:merge(…)` selector](https://v3.tailwindcss.com/docs/plugins#parent-and-sibling-states) for parent and sibling states. We can ignore these now because in v4, `group-*` and `peer-*` variants _compound automatically_ and you don't have to define them anymore. ## Test plan Added a unit test to ensure that the `optional` variant example from the v3 docs work as expected.
Configuration menu - View commit details
-
Copy full SHA for f3157cd - Browse repository at this point
Copy the full SHA f3157cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6fb98d2 - Browse repository at this point
Copy the full SHA 6fb98d2View commit details -
Make candidate template migrations faster (#18025)
This PR makes the migrations for templates much faster. To make this work, I also had to move things around a bit (so you might want to check this PR commit by commit). I also solved an issue by restructuring the code. ### Performance For starters, we barely applied any caching when migrating candidates from α to β. The problem with this is that in big projects the same candidates will appear _everywhere_, so caching is going to be useful here. One of the reasons why we didn't do any caching is that some migrations were checking if a migration is actually safe to do. To do this, we were checking the `location` (the location of the candidate in the template). Since this location is unique for each template, caching was not possible. So the first order of business was to hoist the `isSafeMigration` check up as the very first thing we do in the migration. If we do this first, then the only remaining code relies on the `DesignSystem`, `UserConfig` and `rawCandidate`. In a project, the `DesignSystem` and `UserConfig` will be the same during the migration, only the `rawCandidate` will be different which means that we can move all this logic in a good old `DefaultMap` and cache the heck out of it. Running the numbers on our Tailwind Plus repo, this results in: ``` Total seen candidates: 2 211 844 Total migrated candidates: 7 775 Cache hits: 1 575 700 ``` That's a lot of work we _don't_ have to do. Looking at the timings, the template migration step goes from ~45s to ~10s because of this. Another big benefit of this is that this makes migrations _actually_ safe. Before we were checking if a migration was safe to do in specific migrations. But other migrations were still printing the candidate which could still result in an unsafe migration. For example when migrating the `blur` and the `shadow` classes, the `isSafeMigration` was used. But if the input was `!flex` then the safety check wasn't even checked in this specific migration. ### Safe migrations Also made some changes to the `isSafeMigration` logic itself. We used to start by checking the location, but thinking about the problem again, the actual big problem we were running into is classes that are short like `blur`, and `shadow` because they could be used in other contexts than a Tailwind CSS class. Inverting this logic means that more specific Tailwind CSS classes will very likely _not_ cause any issues at all. For example: - If you have variants: `hover:focus:flex` - If you have arbitrary properties: `[color:red]` - If you have arbitrary values: `bg-[red]` - If you have a modifier: `bg-red-500/50` - If you have a `-` in the name: `bg-red-500` Even better if we can't parse a candidate at all, we can skip the migrations all together. This brings us to the issue in #17974, one of the issues was already solved by just hoisting the `isSafeMigration`. But to make the issue was completely solved I also made sure that in Vue attributes like `:active="…"` are also considered unsafe (note: `:class` is allowed). Last but not least, in case of the `!duration` that got replaced with `duration!` was solved by verifying that the candidate actually produces valid CSS. We can compute the signature for this class. The reason this wasn't thrown away earlier is because we can correctly parse `duration` but `duration` on its own doesn't exist, `duration-<number>` does exist as a functional utility which is why it parsed in the first place. Fixes: #17974 ## Test plan 1. Ran the tool on our Tailwind UI Templates repo to compare the new output with the "old" behavior and there were no differences in output. 2. Ran the tool on our Tailwind Plus repo, and the template migration step went from ~45s to ~10s. 3. Added additional tests to verify the issues in #17974 are fixed. [ci-all] let's run this on all CI platforms...
Configuration menu - View commit details
-
Copy full SHA for 1ada8e0 - Browse repository at this point
Copy the full SHA 1ada8e0View commit details -
Fix missing extracted classes containing
.
in Clojure (#18038)This PR fixes an issue in the Clojure pre-processor where candidates including `.` characters were not extracted correctly. The solution here is to only replace the `.` with a ` ` when the `.` is not surrounded by numbers. This means that: ``` :.foo.bar ``` Becomes ``` : foo bar ``` But ``` :.gap-1.5.flex ``` Becomes ``` : gap-1.5 flex ``` This way the `gap-1.5` is correctly extracted. ## Test plan 1. Added a test for this case 2. Tested this in the extractor tool as well. Notice how the `gap-1.5` is correctly extracted here. <img width="1247" alt="image" src="https://github.com/user-attachments/assets/f5dd2600-5c5e-4ad8-88af-4e5be44340f5" /> Fixes: 17760
Configuration menu - View commit details
-
Copy full SHA for bf591fe - Browse repository at this point
Copy the full SHA bf591feView commit details -
Prepare v4.1.7 release (#18040)
Co-authored-by: Adam Wathan <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 74e084a - Browse repository at this point
Copy the full SHA 74e084aView commit details
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 v4.1.6...v4.1.7