-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Comparing changes
Open a pull request
base repository: tailwindlabs/tailwindcss
base: v4.1.15
head repository: tailwindlabs/tailwindcss
compare: v4.1.16
- 11 commits
- 57 files changed
- 3 contributors
Commits on Oct 20, 2025
-
Update jiti 2.6.0 → 2.6.1 (patch) (#19160)
Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request. ### What changed? #### ✳️ jiti (2.6.0 → 2.6.1) · [Repo](https://github.com/unjs/jiti) · [Changelog](https://github.com/unjs/jiti/blob/main/CHANGELOG.md) <details> <summary>Release Notes</summary> <h4><a href="https://github.com/unjs/jiti/releases/tag/v2.6.1">2.6.1</a></h4> <blockquote><p dir="auto"><a href="https://bounce.depfu.com/github.com/unjs/jiti/compare/v2.6.0...v2.6.1">compare changes</a></p> <h3 dir="auto">🩹 Fixes</h3> <ul dir="auto"> <li> <strong>interop:</strong> Only passthrough default if it is not a promise (<a href="https://bounce.depfu.com/github.com/unjs/jiti/pull/408">#408</a>)</li> </ul> <h3 dir="auto">📦 Build</h3> <ul dir="auto"> <li>Revert to <code class="notranslate">terser-webpack-plugin</code> (<a href="https://bounce.depfu.com/github.com/unjs/jiti/pull/407">#407</a>)</li> </ul> <h3 dir="auto">❤️ Contributors</h3> <ul dir="auto"> <li>Kricsleo (<a href="https://bounce.depfu.com/github.com/kricsleo">@kricsleo</a>)</li> </ul></blockquote> <p><em>Does any of this look wrong? <a href="https://depfu.com/packages/npm/jiti/feedback">Please let us know.</a></em></p> </details> <details> <summary>Commits</summary> <p><a href="https://github.com/unjs/jiti/compare/82919cff8b7a37109b07bf0fcc24a6289976de4d...aedcdee7fed09dfd1cb7945daff64a6e41004f09">See the full diff on Github</a>. The new version differs by 6 commits:</p> <ul> <li><a href="https://github.com/unjs/jiti/commit/aedcdee7fed09dfd1cb7945daff64a6e41004f09"><code>chore(release): v2.6.1</code></a></li> <li><a href="https://github.com/unjs/jiti/commit/8b4149748167179c2a508d2569e88416a9122486"><code>chore: remove unused code</code></a></li> <li><a href="https://github.com/unjs/jiti/commit/974ca4008aba0213ffb41d32ef317f92dd3d1be9"><code>chore: update deps</code></a></li> <li><a href="https://github.com/unjs/jiti/commit/e84069242785f95b3da6615b270ad24183892b2d"><code>build: revert to `terser-webpack-plugin` (#407)</code></a></li> <li><a href="https://github.com/unjs/jiti/commit/092cdd995288abe5f770db68a6659fe3edff3745"><code>fix(interop): only passthrough default if it is not a promise (#408)</code></a></li> <li><a href="https://github.com/unjs/jiti/commit/037c646c80b34eb0044e466f61826375257f7128"><code>chore: update bench</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 a6a7e4c - Browse repository at this point
Copy the full SHA a6a7e4cView commit details -
Incorporate changes from latest
ignorecrate (#19148)This updates our internal fork of the `ignore` crate to incorporate changes from the latest release [v0.4.24](BurntSushi/ripgrep@ignore-0.4.23...ignore-0.4.24). Aside: We should look into opening issues about the changes we had to make to see if they could be addressed in the crate itself so we can get rid of our fork.
Configuration menu - View commit details
-
Copy full SHA for 6c40814 - Browse repository at this point
Copy the full SHA 6c40814View commit details -
Collapse multiple utilities (#19147)
Some commits look like a lot of changes, but they just move things around, so best to use `?w=1` when viewing commit by commit. This PR adds a new feature to the `designSystem.canonicalizeCandidates` to collapse multiple utilities to fewer utilities. To make this possible, we also have to convert some logical properties to physical properties (controllable via an option). ```ts ds.canonicalizeCandidates(['w-4', 'h-4'], { collapse: true // Default `true` logicalToPhysical: true // Default `true` }) // → ['size-4'] ``` We can already compute the signature of each utility, where if two utilities have the same signature they are considered the same. However it's kind of impossible to generate all combinations of all utilities ever to figure out if there is a potential collapse possible. Even if we just focus on the incoming list of candidates, there could still be a lot of classes. So instead we have to be a bit more clever. First, we group candidates together by the used variants and if the important `!` flag was used. We can improve this in the future, but for now we won't even try to combine `hover:w-4 h-4`. Next, for each candidate, we figure out which property and value it uses. We can build up a lookup table for this. We already did this process for all utilities in the system as well. The lookup table for `w-4 h-4 p-4` might look something like this. ```json { "width": { "16px": ["w-4", "size-4"], }, "height": { "16px": ["h-4", "size-4"], }, "padding": { "16px": ["p-4"], } } ``` Next, we can build groups of candidates where an intersection exists in the lookup table. In the example above, we can see that `w-4` and `h-4` both map to `size-4` for the value `16px`. So we can group these two candidates. The `p-4`d doesn't intersect with anything else, so it remains alone. This also means that we only have to generate combinations for two candidates (2^2 = 4) instead of three (2^3 = 8). In practice, your class list might have many classes, so keeping this number low is important. When we generate combinations, we will generate the most amount of candidates first so we have the largest collapse possible. We also stop when we reach <= 1 combinations because we need at least two candidates to collapse. Since this uses the internal design system, if you have custom `@utility`s, this will work as expected. ```css @Utility example { @apply border rounded p-4; } ``` If you then use: ```html <div class="border m-0 rounded p-4"></div> ``` Then we can collapse this to: ```html <div class="example m-0"></div> ``` But even if we used: ```html <div class="border m-0 rounded pt-4 pb-4 px-4"></div> ``` It would still collapse to: ```html <div class="example m-0"></div> ``` ...because the `pt-4` and `pb-4` can collapse to `py-4`, and `py-4` and `px-4` can collapse to `p-4`. This is also where that logical to physical conversion comes into play, because while `pt-4` and `pb-4` set the physical `padding-top` and `padding-bottom` properties. The `py-4` utility sets the logical `padding-block` property. So we internally transform `padding-block` to the `padding-top` and `padding-bottom` physical properties. The funny thing is that this logical to physical conversion actually means that we will convert `pt-4` and `pb-4` from _physical_ to _logical_ properties, because we converted to `py-4`... In _most_ cases it's fine, and even preferred to use `py-1` over `pt-1 pb-1`, but in case it's not, then you can disable the `logicalToPhysical` option. ## Test plan Added some dedicated tests for this new functionality.Configuration menu - View commit details
-
Copy full SHA for 66c18ca - Browse repository at this point
Copy the full SHA 66c18caView commit details -
Ignore
--tw-variables during internal signature computation (#19156)This PR improves some of the signature computation logic. Right now, when you want to convert `[font-weight:400]` to `font-normal` it's not going to work because the signatures don't like up: ```css /* [font-weight:400] */ .x { font-weight: 400; } /* font-normal */ .x { --tw-font-weight: 400; font-weight: 400; } ``` So this PR essentially ignores `--tw-{property}` _if_ the `{property}` exists with the exact same value. The main reason we have this, is to make composition of utilities easier. As with any of these upgrades, they are the expected behavior in most cases, but there could always be a case where you don't want this, but that's why the upgrade tool requires you to review each change before applying it. Intellisense will recommend the simplified class, but it's up to you to decide if you want to apply it or not. There is a known edge case for `leading-{num}`, because the property is `line-height` and the CSS variable is `--tw-leading`. Right now we map `--tw-leading` to `line-height` but we can also update the leading classes to use `--tw-line-height` instead but that feels like a bigger breaking change _if_ people rely on these internal CSS variables...Configuration menu - View commit details
-
Copy full SHA for 7537e34 - Browse repository at this point
Copy the full SHA 7537e34View commit details
Commits on Oct 21, 2025
-
Stop suggesting legacy utilities (#19169)
It was already supposed to work this way — and it appeared via the tests that it did — but the tests weren't loading the design system normally so when we split the legacy utilities into a separate file it stopped testing this properly. The setup here is a bit iffy but the gist is: - We allow static utilities to be suggested by default - A static utility can *opt out* of suggestions by explicitly registering themselves to return none.
Configuration menu - View commit details
-
Copy full SHA for 3a4ab82 - Browse repository at this point
Copy the full SHA 3a4ab82View commit details -
Improve memory usage during canonicalization (#19171)
This PR drastically improves the memory usage when performing canonicalization if you swap out the underlying DesignSystem often. This will be most noticeable in Intellisense. The big issue we had is that we used module scoped Map objects where we cache data based on the DesignSystem. If you then create new design systems (often), then the cache would just keep growing and growing. This PR solves that by essentially storing all the caches on the Design System itself. This way, when you throw away a Design System, all the caches go with it. Another approach would've been to use a WeakMap, but then we would have to make sure that no strong references to the DesignSystem exist anywhere else, otherwise we would still have the same memory issues. Note: make sure to go commit by commit and use `?w=1` to ignore whitespace changes. ## Test plan 1. All existing tests pass Not super sure how to test this as part of the test suite without making it slow But I also don't think that's super necessary either. Here is an experiment I did where I introduce 5 design systems: <img width="1326" height="274" alt="image" src="https://github.com/user-attachments/assets/817025e3-0f5b-44be-949b-54ed08f5b3fb" /> On the current `main` branch, this looks like: <img width="619" height="69" alt="image" src="https://github.com/user-attachments/assets/588ae99b-c978-4c01-bfd1-5cc0725723a8" /> In this PR, the memory usage looks like: <img width="512" height="56" alt="image" src="https://github.com/user-attachments/assets/0052ad21-7b99-4edf-8a14-8ccef52362db" /> The memory usage is stable, but to actually prove that we can still track multiple design systems, let's track them all in a `Set` so garbage collection cannot get rid of the unused design system objects: <img width="847" height="230" alt="image" src="https://github.com/user-attachments/assets/5f044927-3d53-4c15-8145-78eb2b4d6d54" /> Now we're sort of back to the current situation on `main`: <img width="507" height="53" alt="image" src="https://github.com/user-attachments/assets/868c0238-8646-41ce-8151-e0ef6dd17d64" />
Configuration menu - View commit details
-
Copy full SHA for 56e7f3b - Browse repository at this point
Copy the full SHA 56e7f3bView commit details
Commits on Oct 22, 2025
-
Discard candidates with an empty data type (#19172)
Fixes tailwindlabs/tailwindcss-intellisense#1479 Maybe should close tailwindlabs/tailwindcss-intellisense#1480 — perhaps we can find a workaround there for older versions? We're building up a class name in code to validate if something is a valid variant: `{variant}:[color:red]` if `{variant}` got replaced with `bg-[` then we'd produce `bg-[:[color:red]` and this parsed as a valid candidate: ``` bg-[:[color:red] ^^ root: `bg` ^ data type: `` (empty string) — this should be invalid ^^^^^^^^^^ value: `[color:red` ``` The value isn't valid _but_ the syntax for arbitrary values is pretty lax in core. Oxide already won't pick something like this up though so no problem there. Only a problem for something like IntelliSense or clients using the compile() API directly.
Configuration menu - View commit details
-
Copy full SHA for 29687e0 - Browse repository at this point
Copy the full SHA 29687e0View commit details -
Fix canonicalization of arbitrary variants with attribute selectors (#…
…19176) Fixes tailwindlabs/tailwindcss-intellisense#1481 We were detecting when we needed to apply the `*` and `**` variants and even detecting attribute selectors. However we only cleaned up the attribute selectors when they were `data-*` or `aria-*` attributes. This resulted in a "loop" of sorts because we'd: - See something like `[&_>_[foo]]:flex` - Notice that it needs a `*` variant - Add the `*` variant, giving `*:[&_>[foo]]:flex` - But fail to cleanup the remainder of the variant This then meant that we'd see the `*:[&_>[foo]]:flex` the next time we checked, notice that it still needed a `*` variant, and repeat… This PR fixes this case to clean up the selector.
Configuration menu - View commit details
-
Copy full SHA for 0113b88 - Browse repository at this point
Copy the full SHA 0113b88View commit details -
Improve canonicalization for
& > :pseudoand& :pseudoarbitrary ……variants (#19178) This improves canonicalization of arbitrary variants that use pseudo classes a bit. Before this we would see `[&_:first-child]:flex` and leave it be when it can instead be written as `**:first:flex`. Likewise, for pseudo classes that don't have a variant, we can still simplify things a bit as `[&_:--custom]` can be written `**:[:--custom]`.
Configuration menu - View commit details
-
Copy full SHA for a41add9 - Browse repository at this point
Copy the full SHA a41add9View commit details
Commits on Oct 23, 2025
-
Fix incorrect colors used in pseudo-element (#19184)
This PR essentially reverts #19069 We added the nested `&` inside the `@supports` query when we create fallbacks for color-mix so that devtools (Safari) doesn't freak out. This works in most cases, however, if you have a parent pseudo element like `::before`, then the browser will not allow the nested `&` resulting in invalid CSS. This PR means that we go back to the broken devtools experience in Safari, but at least the CSS is valid and works as expected. Fixes: #19183
Configuration menu - View commit details
-
Copy full SHA for 601d671 - Browse repository at this point
Copy the full SHA 601d671View commit details -
Configuration menu - View commit details
-
Copy full SHA for cbbbe84 - Browse repository at this point
Copy the full SHA cbbbe84View 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.15...v4.1.16