106 Commits
Author SHA1 Message Date
Robin MalfaitandGitHub 9b37af5508 Prepare release 4.0.13 (#17132) 2025-03-11 17:58:53 +01:00
6dde284a63 Prepare v4.0.12 release (#17033)
Co-authored-by: Philipp Spiess <[email protected]>
2025-03-07 12:38:53 +01:00
Philipp SpiessandGitHub bd5a64258b Prepare v4.0.11 release (#16987) 2025-03-06 11:09:39 +00:00
a98d9b374d Prepare v4.0.10 release (#16963)
Co-authored-by: Adam Wathan <[email protected]>
2025-03-05 18:32:15 +01:00
3d4871420a Prepare v4.0.9 release (#16804)
Co-authored-by: Adam Wathan <[email protected]>
2025-02-25 17:33:28 +01:00
4de5b3c7bd Prepare v4.0.8 release (#16713)
<!--

👋 Hey, thanks for your interest in contributing to Tailwind!

**Please ask first before starting work on any significant new
features.**

It's never a fun experience to have your pull request declined after
investing a lot of time and effort into a new feature. To avoid this
from happening, we request that contributors create an issue to first
discuss any significant new features. This includes things like adding
new utilities, creating new at-rules, or adding new component examples
to the documentation.


https://github.com/tailwindcss/tailwindcss/blob/master/.github/CONTRIBUTING.md

-->

---------

Co-authored-by: Adam Wathan <[email protected]>
2025-02-21 16:06:37 +01:00
632414c827 Prepare v4.0.7 release (#16629)
Co-authored-by: Adam Wathan <[email protected]>
2025-02-18 16:51:20 +01:00
Robin MalfaitandGitHub 7cf455b174 Pin exact versions of tailwindcss and @tailwindcss/* (#16623)
This PR fixes an issue where installing a specific version of
`@tailwindcss/postcss` and `tailwindcss` could still result in a version
mismatch. This is because we were relying on `^4.0.6` for example
instead of `4.0.6`.

This PR now pins all these versions to prevent this:
```
❯ pnpm why tailwindcss
devDependencies:
@tailwindcss/postcss 4.0.5
├─┬ @tailwindcss/node 4.0.6
│ └── tailwindcss 4.0.6
└── tailwindcss 4.0.5
```
2025-02-18 11:44:12 +01:00
depfu[bot]andGitHub 7646f5cc41 Update enhanced-resolve 5.18.0 → 5.18.1 (patch) (#16439) 2025-02-11 18:02:29 +01:00
Robin MalfaitandGitHub f47bec0c0d Prepare v4.0.6 (#16407) 2025-02-10 14:09:00 +01:00
15ead3303d Prepare v4.0.5 (#16373)
<!--

👋 Hey, thanks for your interest in contributing to Tailwind!

**Please ask first before starting work on any significant new
features.**

It's never a fun experience to have your pull request declined after
investing a lot of time and effort into a new feature. To avoid this
from happening, we request that contributors create an issue to first
discuss any significant new features. This includes things like adding
new utilities, creating new at-rules, or adding new component examples
to the documentation.


https://github.com/tailwindcss/tailwindcss/blob/master/.github/CONTRIBUTING.md

-->

---------

Co-authored-by: Adam Wathan <[email protected]>
2025-02-08 13:48:34 -05:00
5895a5ae3f Prepare v4.0.4 (#16302)
Co-authored-by: Adam Wathan <[email protected]>
2025-02-06 15:18:11 +01:00
Philipp SpiessandGitHub 1bb44ee976 Upgrade @parcel/watcher to 2.5.1 (#16248)
Closes #16225
2025-02-04 15:14:52 +01:00
Robin MalfaitandGitHub b6d9fea6a7 Prepare v4.0.3 (#16146) 2025-02-01 12:38:55 +01:00
8b473067a3 Prepare for v4.0.2 release (#16131)
Co-authored-by: Adam Wathan <[email protected]>
2025-01-31 19:30:36 +01:00
3946686e25 Prepare v4.0.1 release (#16018)
Co-authored-by: Adam Wathan <[email protected]>
2025-01-29 14:14:35 -05:00
Jordan PittmanandGitHub adfa212ea1 Prepare v4.0.0 release (#15693) 2025-01-21 20:58:59 +00:00
94b99cb1fd v4.0.0-beta.10 (#15691)
Co-authored-by: Adam Wathan <[email protected]>
2025-01-21 16:19:28 +00:00
Robin MalfaitandGitHub e9e75e7e55 Write to stdout when --output is omitted (#15656) 2025-01-17 15:23:34 +00:00
0c4bd02e74 Prepare v4.0.0-beta.9 release (#15583)
Co-authored-by: Adam Wathan <[email protected]>
2025-01-09 17:04:34 +00:00
depfu[bot]GitHubdepfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
95f9e49134 Update enhanced-resolve 5.17.1 → 5.18.0 (minor) (#15582)
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?




#### ✳️ enhanced-resolve (5.17.1 → 5.18.0) ·
[Repo](https://github.com/webpack/enhanced-resolve)



<details>
<summary>Release Notes</summary>
<h4><a
href="https://github.com/webpack/enhanced-resolve/releases/tag/v5.18.0">5.18.0</a></h4>

<blockquote><h3 dir="auto">Features</h3>
<ul dir="auto">
<li>Added wildcards support for aliases</li>
</ul></blockquote>
<p><em>Does any of this look wrong? <a
href="https://depfu.com/packages/npm/enhanced-resolve/feedback">Please
let us know.</a></em></p>
</details>

<details>
<summary>Commits</summary>
<p><a
href="https://github.com/webpack/enhanced-resolve/compare/247edebc909040ff99200108f7165e57f4fac2b1...27e457a905776154c9c0f75bc0f822eeab36d2c8">See
the full diff on Github</a>. The new version differs by 9 commits:</p>
<ul>
<li><a
href="https://github.com/webpack/enhanced-resolve/commit/27e457a905776154c9c0f75bc0f822eeab36d2c8"><code>chore(release):
5.18.0</code></a></li>
<li><a
href="https://github.com/webpack/enhanced-resolve/commit/88ceebe3cca0a054786f12659f5239f377087f8e"><code>feat:
add wildcards support for aliases</code></a></li>
<li><a
href="https://github.com/webpack/enhanced-resolve/commit/35b67ce83434be840c6af0012449d94130ee4dd7"><code>feat:
add wildcards</code></a></li>
<li><a
href="https://github.com/webpack/enhanced-resolve/commit/4fbcfa1c831858b495b7ac7835cb3a9f10496495"><code>chore(deps):
bump cross-spawn from 7.0.3 to 7.0.6</code></a></li>
<li><a
href="https://github.com/webpack/enhanced-resolve/commit/572a54f0c68dcf64a017433c188eee047a3cfea2"><code>chore(deps):
bump cross-spawn from 7.0.3 to 7.0.6</code></a></li>
<li><a
href="https://github.com/webpack/enhanced-resolve/commit/af4e2fb155b0e885ec50f7a631f3298fdc1c08ec"><code>ci:
add Node.js v23</code></a></li>
<li><a
href="https://github.com/webpack/enhanced-resolve/commit/bf443c04acc913461c033c1f8af1ab0a58b770ca"><code>ci:
add Node.js v23</code></a></li>
<li><a
href="https://github.com/webpack/enhanced-resolve/commit/72999caf002f6f7bb4624e65fdeb7ba980b11e24"><code>chore(deps):
bump micromatch from 4.0.5 to 4.0.8</code></a></li>
<li><a
href="https://github.com/webpack/enhanced-resolve/commit/fbee162cc291a84e5f711f9d7152985a904fda2f"><code>chore(deps):
bump micromatch from 4.0.5 to 4.0.8</code></a></li>
</ul>
</details>












---
![Depfu
Status](https://depfu.com/badges/edd6acd35d74c8d41cbb540c30442adf/stats.svg)

[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>
2025-01-09 17:26:48 +01:00
Philipp SpiessandGitHub 28f25eae90 Upgrade lightningcss to 1.29.0 (#15576)
Closes #15438
Closes #15560
Closes #15561
Closes #15562

This PR upgrades `lightningcss` to `1.29.0` and uses the [new feature
flag](https://github.com/parcel-bundler/lightningcss/commit/304389600fb655c5b1af55f1946518e9b755b860)
to disable the light-dark function transpilation.
2025-01-09 17:14:48 +01:00
Robin MalfaitandGitHub f50f80c302 Prepare v4.0.0-beta.8 release (#15418) 2024-12-17 13:31:28 +01:00
37dd8d2377 Prepare v4.0.0-beta.7 release (#15392)
Co-authored-by: Adam Wathan <[email protected]>
2024-12-13 14:18:21 +00:00
Philipp SpiessandGitHub e0ea4b0a01 Change Chrome target to 111 (#15389)
Resolves https://github.com/tailwindlabs/tailwindcss/discussions/15387

This PR changes the Chrome target to 111. We initially picked 120
because of the unnecessary `:dir()` down-leveling but we that was maybe
a bit too recent as it was causing some necessary prefixes to not be
generated (e.g. `-webkit-background-clip`).

This PR changes it to 111 which we require for the `color-mix()`
function. To work around the `:dir()` down-leveling we also disable the
`DirSelector` lightningcss feature which is used to control this
behavior:
https://sourcegraph.com/github.com/parcel-bundler/lightningcss/-/blob/src/selector.rs?L1964-1965
2024-12-13 15:07:04 +01:00
Robin MalfaitandGitHub 0fd9c859cc Improve debug logs (#15303)
This PR improves the debug logs for the `@tailwindcss/postcss`
integration. It uses custom instrumentation to provide a nested but
detailed overview of where time is spent during the build process.

The updated logs look like this:
```
[0.15ms] [@tailwindcss/postcss] src/app/geistsans_9fc57718.module.css
[0.14ms]   ↳ Quick bail check
[0.02ms] [@tailwindcss/postcss] src/app/geistsans_9fc57718.module.css
[0.01ms]   ↳ Quick bail check

[0.03ms] [@tailwindcss/postcss] src/app/geistmono_b9f59162.module.css
[0.02ms]   ↳ Quick bail check
[0.12ms] [@tailwindcss/postcss] src/app/geistmono_b9f59162.module.css
[0.11ms]   ↳ Quick bail check

[42.09ms] [@tailwindcss/postcss] src/app/globals.css
[ 0.01ms]   ↳ Quick bail check
[12.12ms]   ↳ Setup compiler
[ 0.11ms]     ↳ PostCSS AST -> Tailwind CSS AST
[11.99ms]     ↳ Create compiler
[ 0.07ms]   ↳ Register full rebuild paths
[ 0.06ms]   ↳ Setup scanner
[ 7.51ms]   ↳ Scan for candidates
[ 5.86ms]   ↳ Register dependency messages
[ 5.88ms]   ↳ Build utilities
[ 8.34ms]   ↳ Optimization
[ 0.23ms]     ↳ AST -> CSS
[ 4.20ms]     ↳ Lightning CSS
[ 3.89ms]     ↳ CSS -> PostCSS AST
[ 1.97ms]   ↳ Update PostCSS AST
```
2024-12-11 15:27:20 +01:00
Jordan PittmanandGitHub 886a358d13 Prepare v4.0.0-beta.6 release (#15325) 2024-12-06 14:32:21 -05:00
bcc85b2eff Prepare v4.0.0-beta.5 (#15285)
Co-authored-by: Adam Wathan <[email protected]>
2024-12-04 16:28:16 +01:00
Robin MalfaitandGitHub 3d4547ad58 Prepare v4.0.0-beta.4 (#15245) 2024-11-29 17:18:42 +01:00
Philipp SpiessandAdam Wathan d5be5dac22 Prepare v4.0.0-beta.3 (#15217)
Co-authored-by: Adam Wathan <[email protected]>
2024-11-27 18:25:37 +01:00
9f55ad0af8 Set browser targets for iOS Safari, Firefox, and Chrome (#15166)
Closes #15160

We need to set browser targets for each browser individually to see
vendor prefixes created for each browser.

Exact values are up for discussion, this first pass is taken from
@adamwathan's comments in
https://github.com/tailwindlabs/tailwindcss/issues/15160

---------

Co-authored-by: Adam Wathan <[email protected]>
2024-11-26 11:22:12 +00:00
17064b3bfc Prepare v4.0.0-beta.2 release (#15104)
Co-authored-by: Adam Wathan <[email protected]>
2024-11-22 11:17:21 -05:00
Jordan PittmanandGitHub 4c062643c0 Don't print minified code when the build fails (#15106)
Fix #15085

We were relying on Node's printing of errors during build but this
prints the line of code the error occurs on. Since the code is minified
you'd get a really long string of code that wrapped a ton in the console
before the actual error. Now we print errors during build like we do in
watch mode.
2024-11-22 10:39:51 -05:00
Jordan PittmanandGitHub 5fae12e7bd Prepare v4.0.0-beta.1 release (#15070) 2024-11-21 13:20:30 -05:00
Robin Malfait 47f8c81010 v4.0.0-alpha.36 (#15062)
Prepare v4.0.0-alpha.36
2024-11-21 14:20:56 +01:00
Robin MalfaitandGitHub 8070c5af08 Prepare v4.0.0-alpha.35 release (#15052) 2024-11-20 11:12:32 +00:00
Philipp SpiessandGitHub 85cc3f858c Ensure clients pin the tailwindcss version (#15011)
We noticed that in the current alpha 34 release, the `package.json` file
of the `@tailwindcss/node` package only defines `tailwindcss` as a dev
dependency. This makes it very easy for version mismatches to happen
when a v3 version (or an earlier v4 alpha for that matter) was installed
in the same project:

```json
{
  "name": "@tailwindcss/node",
  "version": "4.0.0-alpha.34",
  "description": "A utility-first CSS framework for rapidly building custom user interfaces.",
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "https://github.com/tailwindlabs/tailwindcss.git",
    "directory": "packages/@tailwindcss-node"
  },
  "bugs": "https://github.com/tailwindlabs/tailwindcss/issues",
  "homepage": "https://tailwindcss.com",
  "files": [
    "dist/"
  ],
  "publishConfig": {
    "provenance": true,
    "access": "public"
  },
  "exports": {
    ".": {
      "types": "./dist/index.d.ts",
      "import": "./dist/index.mjs",
      "require": "./dist/index.js"
    },
    "./require-cache": {
      "types": "./dist/require-cache.d.ts",
      "default": "./dist/require-cache.js"
    },
    "./esm-cache-loader": {
      "types": "./dist/esm-cache.loader.d.mts",
      "default": "./dist/esm-cache.loader.mjs"
    }
  },
  "devDependencies": {
    "tailwindcss": "4.0.0-alpha.34"
  },
  "dependencies": {
    "enhanced-resolve": "^5.17.1",
    "jiti": "^2.0.0-beta.3"
  },
  "scripts": {
    "build": "tsup-node",
    "dev": "pnpm run build -- --watch"
  }
}
```

Furthermore, we were trying to fix issues where our integration test
setup could not install `tailwindcss@3` because of how we did pnpm
overrides.

This PR fixes this by:

- Ensuring every client that calls into `tailwindcss` core marks it as a
version-pinned dependency. You are still required to install
`tailwindcss` in your project along side a client (e.g.
`@tailwindcss/vite`) but we now only use your installed version for
importing the respective `.css` files. For the core logic, we are now
requiring each package to use `tailwindcss` at the same version. This
should help resolve issues like
https://github.com/tailwindlabs/tailwindcss/discussions/14652
- We tried to eliminate the dependency on `tailwindcss` from the
`@tailwindcss/upgrade` package. Unfortunately this is not possible to do
right now because we need to load the CSS files from v4 to create the
right environment. In a future version we could bundle the required CSS
files with `@tailwidncss/upgrade` but it doesn't seem necessary for now.
- We then changed our integration test overrides to only override the
`tailwindcss` package that are dependencies of the known list of
packages that we have `tailwindcss` dependencies on: `@tailwindcss/node`
and `@tailwindcss/upgrade`. This ensures that we can install v3 of
`tailwindcss` in the integration tests and it will work. Something we
want to do for some upgrade tests.

# Test plan

Integration work again. Furthermore we added a quick setup with the CLI
using the local tarballs and ensured it works:

```bash
pnpm init
pnpm install ../../tailwindcss/dist/tailwindcss-cli.tgz 
pnpm install ../../tailwindcss/dist/tailwindcss.tgz 
echo '@import "tailwindcss";' > index.css
echo '<div class="underline"></div>' > index.html
pnpm tailwindcss -i index.css -o out.css
cat out.css
```
2024-11-15 17:18:48 +01:00
Philipp SpiessandGitHub f875fedad6 Prepare v4.0.0-alpha.34 (#15002) 2024-11-14 18:23:40 +01:00
Philipp SpiessandGitHub c498051ab0 Upgrade @parcel/watcher to 2.5.0 (#14978)
This PR upgrades parcel watcher to 2.5.0.

Closes #14957
Closes #14958 
Closes #14969 
Closes #14970
Closes #14971
2024-11-13 11:38:43 +01:00
4483f7ffd0 Prepare v4.0.0-alpha.33 release (#14967)
Co-authored-by: Adam Wathan <[email protected]>
2024-11-11 20:28:41 -05:00
131656fe4e Prepare v4.0.0-alpha.32 (#14954)
Co-authored-by: Adam Wathan <[email protected]>
2024-11-11 11:05:22 -05:00
a873fb4b3a Optimize generated CSS output (#14873)
This PR improves the generated CSS by running it through Lightning CSS
twice.Right now Lightning CSS merges adjacent at-rules and at the end
flattens the nesting. This means that after the nesting is flattened,
the at-rules that are adjacent and could be merged together will not be
merged.

This PR improves our output by running Lightning CSS twice on the
generated CSS which will make sure to merge adjacent at-rules after the
nesting is flattened.

Note: in the diff output you'll notice that some properties are
duplicated. These need some fixes in Lightning CSS itself but they don't
break anything for us right now.

Related PR in Lightning CSS for the double `-webkit-backdrop-filter` can
be found here: https://github.com/parcel-bundler/lightningcss/pull/850

---------

Co-authored-by: Philipp Spiess <[email protected]>
2024-11-06 11:39:09 +00:00
Jordan PittmanandGitHub 2fe0565f0a Fix macOS test flakiness (#14869) 2024-11-04 13:07:25 -05:00
0c974af172 Support migrating projects with multiple config files (#14863)
When migrating a project from Tailwind CSS v3 to Tailwind CSS v4, then
we started the migration process in the following order:

1. Migrate the JS/TS config file
2. Migrate the source files (found via the `content` option)
3. Migrate the CSS files

However, if you have a setup where you have multiple CSS root files
(e.g.: `frontend` and `admin` are separated), then that typically means
that you have an `@config` directive in your CSS files. These point to
the Tailwind CSS config file.

This PR changes the migration order to do the following:

1. Build a tree of all the CSS files
2. For each `@config` directive, migrate the JS/TS config file
3. For each JS/TS config file, migrate the source files

If a CSS file does not contain any `@config` directives, then we start
by filling in the `@config` directive with the default Tailwind CSS
config file (if found, or the one passed in). If no default config file
or passed in config file can be found, then we will error out (just like
we do now)

---------

Co-authored-by: Adam Wathan <[email protected]>
2024-11-04 16:52:11 +00:00
Robin MalfaitandGitHub 4b2f947602 Prepare v4.0.0-alpha.31 release (#14823)
Prepare v4.0.0-alpha.31 release
2024-10-30 07:53:51 -04:00
6972b0bcca Auto source detection improvements (#14820)
This PR introduces a new `source(…)` argument and improves on the
existing `@source`. The goal of this PR is to make the automatic source
detection configurable, let's dig in.

By default, we will perform automatic source detection starting at the
current working directory. Auto source detection will find plain text
files (no binaries, images, ...) and will ignore git-ignored files.

If you want to start from a different directory, you can use the new
`source(…)` next to the `@import "tailwindcss/utilities"
layer(utilities) source(…)`.

E.g.:

```css
/* ./src/styles/index.css */
@import 'tailwindcss/utilities' layer(utilities) source('../../');
```

Most people won't split their source files, and will just use the simple
`@import "tailwindcss";`, because of this reason, you can use
`source(…)` on the import as well:

E.g.:

```css
/* ./src/styles/index.css */
@import 'tailwindcss' source('../../');
```

Sometimes, you want to rely on auto source detection, but also want to
look in another directory for source files. In this case, yuo can use
the `@source` directive:

```css
/* ./src/index.css */
@import 'tailwindcss';

/* Look for `blade.php` files in `../resources/views` */
@source '../resources/views/**/*.blade.php';
```

However, you don't need to specify the extension, instead you can just
point the directory and all the same automatic source detection rules
will apply.

```css
/* ./src/index.css */
@import 'tailwindcss';

@source '../resources/views';
```

If, for whatever reason, you want to disable the default source
detection feature entirely, and only want to rely on very specific glob
patterns you define, then you can disable it via `source(none)`.

```css
/* Completely disable the default auto source detection */
@import 'tailwindcss' source(none);

/* Only look at .blade.php files, nothing else  */
@source "../resources/views/**/*.blade.php";
```

Note: even with `source(none)`, if your `@source` points to a directory,
then auto source detection will still be performed in that directory. If
you don't want that, then you can simply add explicit files in the globs
as seen in the previous example.

```css
/* Completely disable the default auto source detection */
@import 'tailwindcss' source(none);

/* Run auto source detection in `../resources/views` */
@source "../resources/views";
```

---------

Co-authored-by: Jordan Pittman <[email protected]>
Co-authored-by: Adam Wathan <[email protected]>
2024-10-29 20:33:34 +00:00
Jordan PittmanandGitHub 9a39071316 Prepare v4.0.0-alpha.30 release (#14789) 2024-10-24 16:22:08 -04:00
depfu[bot]andGitHub a13de52bad Update picocolors 1.0.1 → 1.1.1 (minor) (#14771) 2024-10-24 11:25:50 +02:00
Philipp SpiessandGitHub f9b7d8d4c1 Prepare v4.0.0-alpha.29 release (#14761) 2024-10-23 15:30:26 +02:00
Jordan PittmanandGitHub 91b98a55db Ensure changes to the input CSS file result in a full rebuild (#14744)
Fixes #14726

I think we broke this when we changed core so that it can handle
`@import "…"` in CSS.
2024-10-21 20:29:33 +00:00