Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Allow spaces spaces around operators in attribute selector variants ([#14703](https://github.com/tailwindlabs/tailwindcss/pull/14703))
- Ensure color opacity modifiers work with OKLCH colors ([#14741](https://github.com/tailwindlabs/tailwindcss/pull/14741))
- Ensure changes to the input CSS file result in a full rebuild ([#14744](https://github.com/tailwindlabs/tailwindcss/pull/14744))
- _Upgrade (experimental)_: Migrate `flex-grow` to `grow` and `flex-shrink` to `shrink` ([#14721](https://github.com/tailwindlabs/tailwindcss/pull/14721))
- _Upgrade (experimental)_: Minify arbitrary values when printing candidates ([#14720](https://github.com/tailwindlabs/tailwindcss/pull/14720))
- _Upgrade (experimental)_: Ensure legacy theme values ending in `1` (like `theme(spacing.1)`) are correctly migrated to custom properties ([#14724](https://github.com/tailwindlabs/tailwindcss/pull/14724))
Expand Down
17 changes: 17 additions & 0 deletions integrations/cli/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,23 @@ describe.each([
}
`,
])

await fs.write(
'project-a/src/index.css',
css`
@import 'tailwindcss/utilities';
@theme {
--color-*: initial;
}
`,
)

await fs.expectFileToContain('project-a/dist/out.css', [
css`
:root {
}
`,
])
},
)

Expand Down
13 changes: 7 additions & 6 deletions packages/@tailwindcss-cli/src/commands/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,12 @@ export async function handle(args: Result<ReturnType<typeof options>>) {
env.DEBUG && console.timeEnd('[@tailwindcss/cli] Write output')
}

let inputBasePath =
args['--input'] && args['--input'] !== '-'
? path.dirname(path.resolve(args['--input']))
: process.cwd()
let fullRebuildPaths: string[] = []
let inputFilePath =
args['--input'] && args['--input'] !== '-' ? path.resolve(args['--input']) : null

let inputBasePath = inputFilePath ? path.dirname(inputFilePath) : process.cwd()

let fullRebuildPaths: string[] = inputFilePath ? [inputFilePath] : []

async function createCompiler(css: string) {
env.DEBUG && console.time('[@tailwindcss/cli] Setup compiler')
Expand Down Expand Up @@ -201,7 +202,7 @@ export async function handle(args: Result<ReturnType<typeof options>>) {
@import 'tailwindcss';
`
clearRequireCache(resolvedFullRebuildPaths)
fullRebuildPaths = []
fullRebuildPaths = inputFilePath ? [inputFilePath] : []

// Create a new compiler, given the new `input`
compiler = await createCompiler(input)
Expand Down