Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to latest cssnano v6 #14105

Merged
merged 3 commits into from
Aug 2, 2024
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Nothing yet!
- Fix minification when using nested CSS ([#14105](https://github.com/tailwindlabs/tailwindcss/pull/14105))

## [3.4.7] - 2024-07-25

Expand Down
39 changes: 39 additions & 0 deletions integrations/tailwindcss-cli/tests/cli.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,45 @@ describe('Build command', () => {
expect(withoutMinify.length).toBeGreaterThan(withMinify.length)
})

test('--minify does not break nested CSS', async () => {
await writeInputFile('index.html', html`<div class="font-bold"></div>`)
await writeInputFile(
'input.css',
css`
.parent {
& .child {
color: red;
}
& .child {
&:not([href]) {
color: green;
}
}
}
`
)

await $(`${EXECUTABLE} --input ./src/input.css --output ./dist/main.css --minify`)
let withMinify = await readOutputFile('main.css')

// Verify that we got the expected output. Note: `.toIncludeCss` formats
// `actual` & `expected`
expect(withMinify).toIncludeCss(
css`
.parent {
& .child {
color: red;
}
& .child {
&:not([href]) {
color: green;
}
}
}
`
)
})

test('--no-autoprefixer', async () => {
await writeInputFile('index.html', html`<div class="select-none"></div>`)

Expand Down
Loading
Loading