Last 12 weeks · 76 commits
4 of 6 standards met
Describe the bug When running a Vite + React application in development mode with Tailwind CSS v4 and the @tailwindcss/postcss plugin, Vite prints the following warning during CSS processing: A PostCSS plugin did not pass the from option to postcss.parse. This may cause imported assets to be incorrectly transformed. If you've recently added a PostCSS plugin that raised this warning, please contact the package author to fix the issue. The development server starts successfully and the application loads, but the warning is consistently displayed when running npm run dev. Environment OS: Windows Build tool: Vite Vite: 8.2.2 Tailwind CSS: 4.3.3 @tailwindcss/postcss: 4.3.3 PostCSS: 8.5.26 Autoprefixer: 10.5.4 React: 19.2.8 TypeScript: 7.0.2 Package manager: npm PostCSS configuration export default { plugins: { "@tailwindcss/postcss": {}, }, }
Closes #20435 problem rewrites to when a conditional sits between and the string. these are react prop values and not class names so the rewrite breaks them. #18922 added a guard for the direct forms and those still work. the guard is a look behind that only inspects the text immediately before the literal so as soon as a ternary or a nullish branch comes between the two it no longer matches. the four cases from the issue fix find where the value starts and follow it until whatever ends its own syntax. the candidate is the last thing on the line so the value it sits in is the one that has not ended yet. ends at its matching brace ends at its own quote which is what keeps the match inside a single attribute and away from a neighbouring ends at a comma or at the brace around it the walk skips strings and balanced groups as it goes so there is no nesting limit. two things are deliberately not part of the value an argument passed to a call so `shadowvariant:shadowCONDITIONAL_TEMPLATE_SYNTAXmainis-safe-migration.test.tsis-safe-migrationmainis-safe-migration@tailwindcss/upgrademain@tailwindcss/upgrademainCONDITIONAL_TEMPLATE_SYNTAXisMiddleOfStringoutline: nonemain` first, and ran the package test suite locally before opening it.
Summary Fixes a minor grammatical repetition typo ( instead of ) inside the core CSS parser test suite () to keep test assertions clean, correct, and readable. Test plan Run the CSS parser unit tests locally using: Verified that the modified test file parses correctly and all test suites pass without any regression or compilation issues.
Repository: tailwindlabs/tailwindcss. Description: A utility-first CSS framework for rapid UI development. Stars: 97451, Forks: 5603. Primary language: TypeScript. Languages: TypeScript (80.2%), Rust (17.9%), CSS (0.6%), HTML (0.6%), Haml (0.4%). License: MIT. Homepage: https://tailwindcss.com/ Topics: css, css-framework, functional-css, postcss, responsive, tailwindcss, utility-classes. Latest release: v4.3.3 (1mo ago). Open PRs: 33, open issues: 28. Last activity: 3d ago. Community health: 62%. Top contributors: adamwathan, RobinMalfait, depfu[bot], thecrypticace, dependabot-preview[bot], reinink, philipp-spiess, bradlc, dependabot-support, MichaelDeBoey and others.