Open endigo9740 opened 2 months ago
@endigo9740 In a Nuxt project, I also encountered the same issue. I was able to suppress the warning by introducing tailwindcss/nesting on the project side.
import tailwindcssNesting from 'tailwindcss/nesting'
const config = {
vite: {
css: {
postcss: {
plugins: [tailwindcssNesting]
}
}
}
}
export default config
@onishi-kohei good to know. Unfortunately we would rather avoid the extra dependency.
@endigo9740 I think so too.
Same warning, but with a Lit project. We are using tailwindCSS but no nesting CSS.
2:16:07 PM [vite] ✨ optimized dependencies changed. reloading
[vite:css] Nested CSS was detected, but CSS nesting has not been configured correctly.
Please enable a CSS nesting plugin *before* Tailwind in your configuration.
See how here: https://tailwindcss.com/docs/using-with-preprocessors#nesting
125| box-sizing: border-box;
126|
127| & ol {
| ^^^^^^
128| padding-left: 18px;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
129| margin: 0;
| ^^^^^^^^^^^^^^^^
130| }
| ^^^^^
Same issue in React as well
I updated the related packages to latest, and it seems to have fixed or suppress the nested CSS warning.
These are the package versions.
"postcss": "8.4.38",
"tailwindcss": "3.4.3",
"vite": "5.2.12",
postcss.config.js
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
I can confirm that by updating to TailwindCSS v3.4.3
, warning is not displayed anymore
Describe the bug
I'm receiving the following warnings after updating to the
@latest
release:These styles are not present within my project, and we go out of our way to avoid using nested CSS.
To Reproduce
Migrate to the
@latest
release as of today.System
Additional context
The warning mentions arranging the order of Tailwind plugins. We do use Tailwind, but we do not use the Tailwind Nested CSS plugin. Again, we go out of our way to avoid nesting.