Skip to content

Commit 9bbe2e3

Browse files
Revert: Only expose used CSS variables (#16403)
This reverts #16211 We found some unexpected interactions with using `@apply` and CSS variables in multi-root setups like CSS modules or Vue inline `<style>` blocks that were broken due to that change. We plan to re-enable this soon and include a proper fix for those scenarios. ## Test plan - Updated snapshots - Tested using the CLI in a new project: <img width="1523" alt="Screenshot 2025-02-10 at 13 08 42" src="https://github.com/user-attachments/assets/defe0858-adb3-4d61-9d2c-87166558fd68" /> --------- Co-authored-by: Robin Malfait <[email protected]>
1 parent 1f84241 commit 9bbe2e3

21 files changed

+1473
-123
lines changed

Diff for: .github/workflows/prepare-release.yml

+2
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@ jobs:
264264
265265
- name: Build Tailwind CSS
266266
run: pnpm run build
267+
env:
268+
FEATURES_ENV: stable
267269

268270
- name: Run pre-publish optimizations scripts
269271
run: node ./scripts/pre-publish-optimizations.mjs

Diff for: .github/workflows/release.yml

+2
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ jobs:
256256
257257
- name: Build Tailwind CSS
258258
run: pnpm run build
259+
env:
260+
FEATURES_ENV: stable
259261

260262
- name: Run pre-publish optimizations scripts
261263
run: node ./scripts/pre-publish-optimizations.mjs

Diff for: CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
Nothing yet!
10+
### Fixed
11+
12+
- Revert change to no longer include theme variables that aren't used in compiled CSS
1113

1214
## [4.0.5] - 2025-02-08
1315

Diff for: integrations/cli/index.test.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1289,7 +1289,9 @@ test(
12891289
expect(await fs.dumpFiles('./dist/*.css')).toMatchInlineSnapshot(`
12901290
"
12911291
--- ./dist/out.css ---
1292-
<EMPTY>
1292+
:root, :host {
1293+
--color-blue-500: blue;
1294+
}
12931295
"
12941296
`)
12951297

Diff for: packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap

+383
Large diffs are not rendered by default.

Diff for: packages/@tailwindcss-postcss/src/index.test.ts

+10-2
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,11 @@ test('runs `Once` plugins in the right order', async () => {
330330
)
331331

332332
expect(result.css.trim()).toMatchInlineSnapshot(`
333-
".custom-css {
333+
":root, :host {
334+
--color-red-500: red;
335+
}
336+
337+
.custom-css {
334338
color: red;
335339
}"
336340
`)
@@ -343,7 +347,11 @@ test('runs `Once` plugins in the right order', async () => {
343347
}"
344348
`)
345349
expect(after).toMatchInlineSnapshot(`
346-
".custom-css {
350+
":root, :host {
351+
--color-red-500: red;
352+
}
353+
354+
.custom-css {
347355
color: red;
348356
}"
349357
`)

0 commit comments

Comments
 (0)