Bug: Missing TPseudoClasses type when extends variants (tailwind.config.js)
See original GitHub issueReproduce step: (v1.3.1)
- add custom variant in tailwind.config.js
variants: { borderWidth: ['hover'], },
- generate new types:
tailwindcss-classnames --config tailwind.config.js -o ./src/tailwindcss-classnames.ts
Expected:
All tailwind default TPseudoClasses with extended variants
Actually happening
Only get type for custom variants:
export type TPseudoClasses = | 'hover:border' | 'hover:border-0' ...
P/S: Request feature: Generate type for custom plugin
plugins: [require('@tailwindcss/ui')]
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Configuring Variants - Tailwind CSS
Configuring which utility variants are enabled in your project. Overview. The variants section of your tailwind.config.js file is where you control which ...
Read more >All colors are missing after overriding or extending theme ...
config.js to add some colors to my tailwind setup; Finally I compiled my css file using npx following the tailwind CLI method from...
Read more >Tailwind CSS classes is not working in my project?
This error is due to tailwind not finding any classes to scan in what it 'thinks' is your HTML code directories.
Read more >Tailwinds JIT compiler via CDN - Beyond Code
Use the full power of Tailwind CSS' new JIT compiler by including one script tag to your HTML.
Read more >Setup Tailwind CSS with Webpack - Level Up Coding
Copy the following into postcss.config.js . const tailwindcss = require('tailwindcss');module.exports = { plugins: [
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 Free
Top 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
Fixed in 423d5ba9ecfd7dc1e6121cd78745eaa222bd933c 👍
The
postcss-ts-classnames
project does exactly this. you will need to add the generated types frompostcss-ts-classnames
to the this package’s exported classnames function. Maybe will add a feature to the tailwindcss-classnames CLI that does this automatically.