Replies: 2 comments 3 replies
-
|
In a very minimal project, I was able to reproduce the unexpected behavior. I was able to workaround it by setting require("@tailwindcss/postcss")({
- optimize: {
- minify: false,
- }
+ optimize: false,
}), |
Beta Was this translation helpful? Give feedback.
3 replies
-
|
Using // postcss.config.js
const minify = !!process.env.MINIFY;
module.exports = () => {
return {
sourcemaps: false,
plugins: [
require("postcss-nested"),
require("@tailwindcss/postcss")({
optimize: false,
}),
require("./postcss-lightningcss")({
minify,
}),
],
};
};One can wrap the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I have an existing project where I've used BEM style CSS over the years together with Sass style nesting. Before Tailwind v4, I used
postcss-nestedand everything was fine.With Tailwind v4, it seems my nested CSS is mangled:
input.css
✅ EXPECTED: Output using only
postcss-nested❌ ACTUAL: Output using
postcss-nested+ TailwindI was under the impression of that using the
postcss-nestedplugin before Tailwind would fix the BEM style nesting before Tailwind's optimiser would do its thing? But maybe the output from thepostcss-nestedphase isn't passed on to Tailwind as I thought it would?postcss-nested— doesn't work.Here's my PostCSS config:
Beta Was this translation helpful? Give feedback.
All reactions