Build is missing negative value classnames
Environment:
TailwindCSSversion:3.0.7tailwindcss-classnamesversion:3.0.0Node.jsversion:16.13.1
Current Behavior
After using the CLI, the build is missing classes prefixed with - (e.g. -mt-8) for negative values.
Expected Behavior
Build should include classes prefixed with -.
How to Reproduce
- Install
tailwindcss-classnames@latest - Run
npx tailwindcss init - Add
"generate-css-types": "tailwindcss-classnames"to yourpackage.jsonscripts. npm run generate-css-types- Search the resulting
tailwindcss-classnames.tsfile for'-and find 0 results.
Possible solutions (Optional)
Additional Questions
- [x] I've searched the issues list and this is not a duplicate
- [ ] I'm willing to fix this error
Hi I am new to tailwindcss-classnames. I meet the same problem.
Here is my solution.
Starting with typescript 4.1
We can define a type that would validate the string without actually defining all the options.


Hi I am new to tailwindcss-classnames. I meet the same problem.
Here is my solution.
Starting with typescript 4.1
We can define a type that would validate the string without actually defining all the options.
but after the generate-css-types via tailwindcss-classnames, your new type with a negative value will be removed