What version of Tailwind CSS are you using?
v4.1.17
What build tool (or framework if it abstracts the build tool) are you using?
For example: postcss-cli 11.0.0, Next.js 15.1.7, Vite 6.1.0
What version of Node.js are you using?
v24.2
** What browswer**
Chrome
For example: Chrome, Safari, or N/A
What operating system are you using?
Windows
Reproduction URL
https://play.tailwindcss.com/PtV9UI3TBW
Describe your issue
Darkmode in pseudo classes do not work, se the reproduction url.
.card:after {
@apply absolute left-10 h-10 w-10 content-[""];
@apply bg-white dark:bg-red-400;
}
When the site is in dark mode, then the dark:bg-red-400 is not being applied.