Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types for plugin utilities are not generating #215

Open
ivanyurchenk0 opened this issue Apr 30, 2021 · 2 comments
Open

Types for plugin utilities are not generating #215

ivanyurchenk0 opened this issue Apr 30, 2021 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ivanyurchenk0
Copy link

ivanyurchenk0 commented Apr 30, 2021

Environment:

  • TailwindCSS version: 2.1.0
  • tailwindcss-classnames version: 2.1.0
  • Node.js version: 14.16.0

Current Behavior

Types for tailwind utilities that configured properly and working in application are not generating. For example:

https://tailwindcss.com/docs/adding-new-utilities#using-a-plugin

// tailwind.config.js
const plugin = require('tailwindcss/plugin')

module.exports = {
  plugins: [
    plugin(function({ addUtilities }) {
      const newUtilities = {
        '.filter-none': {
          filter: 'none',
        },
        '.filter-grayscale': {
          filter: 'grayscale(100%)',
        },
      }

      addUtilities(newUtilities, ['responsive', 'hover'])
    })
  ]
}

Expected Behavior

Types for tailwind plugin utilities generated.

How to Reproduce

Use upper config file and try to generate types using CLI.

Additional

Ticket created as Issue, not as Feature because there is no information on main page that plugin utilities are not supporting

@ivanyurchenk0 ivanyurchenk0 added the bug Something isn't working label Apr 30, 2021
@muhammadsammy
Copy link
Owner

This project only supports the official TailwindCSS plugins, namely, typography and custom forms plugins.
However you could use https://github.com/esamattis/postcss-ts-classnames which supports postcss plugins

@muhammadsammy
Copy link
Owner

Also PRs are welcome if anyone wants to work on this feature

@muhammadsammy muhammadsammy reopened this May 1, 2021
@muhammadsammy muhammadsammy added enhancement New feature or request help wanted Extra attention is needed and removed bug Something isn't working labels May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants