@media and postcss-nested no longer work in 3.0.24
See original GitHub issueWhat version of Tailwind CSS are you using? v3.0.24
What build tool (or framework if it abstracts the build tool) are you using? postcss@8.4.13
**What version of Node.js are you using?**v16.0.0
What operating system are you using? macOS
Reproduction URL https://github.com/nghiepit/tailwindcss-3-0-24-bug
Describe your issue My styles
body {
@apply text-red-500;
@media (max-width: 1000px) {
@apply text-green-500; // <== ERROR
div {
@apply text-blue-500; // <== ERROR
}
}
div {
@apply text-yellow-50;
}
}
// postcss.config.js
module.exports = {
plugins: {
'tailwindcss/nesting': {},
tailwindcss: {},
},
};
In the v.3.0.24
will be throw an error
TypeError: Cannot set properties of undefined (setting ‘parent’)
But in the CHANGELOG.md I don’t see any breaking changes.
And in the v.3.0.23
the output correctly:
body {
--tw-text-opacity: 1;
color: rgb(239 68 68 / var(--tw-text-opacity))
}
@media (max-width: 1000px) {
body {
--tw-text-opacity: 1;
color: rgb(34 197 94 / var(--tw-text-opacity))
}
body div {
--tw-text-opacity: 1;
color: rgb(59 130 246 / var(--tw-text-opacity))
}
}
body div {
--tw-text-opacity: 1;
color: rgb(254 252 232 / var(--tw-text-opacity))
}
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:6
Top Results From Across the Web
Unexpected exception on upgrading from 5.0.1 to 5.0.2 #106
I'm having the same issue since I upgraded postcss-nested from 5.0.1 to 5.0.3. Error is TypeError: node.getIterator is not a function.
Read more >Nextjs config with postcss nesting doesn't work - Stack Overflow
I am using nextjs with tailwindcss and i am facing the difficulty in adding postcss-nesting to my nextjs app.
Read more >Upgrade Guide - Tailwind CSS
Note that Tailwind CSS v3.0 requires PostCSS 8, and no longer supports PostCSS 7. If you can't upgrade to PostCSS 8, we recommend...
Read more >postcss-nested - npm
PostCSS plugin to unwrap nested rules like how Sass does it. Latest version: 6.0.0, last published: 3 months ago. Start using postcss-nested ......
Read more >Open Source Disclosures - SnapAttack
COMPONENT NAME VERSION LICENSE
@amplitude/types 1.8.2 MIT
@amplitude/ua‑parser‑js 0.7.24 MIT
@amplitude/utils 1.8.2 MIT
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for working on this!
However, if the current fix is only available on the insiders build, should this issue be closed? If others aren’t comfortable using the insiders build in production apps, shouldn’t this issue remain open as a signal about this problem specific to
v3.0.24
?Okay, it’s still insiders built only — we don’t have a normal tagged release yet where you can override the postcss dependency but the situation itself has been taken care of and it’ll be possible in the future to work around situations like these. Sorry for all the trouble — and thanks again!