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

Disable tailwindcss-forms for a specific form #142

Closed
timothymctim opened this issue Jul 17, 2023 · 2 comments
Closed

Disable tailwindcss-forms for a specific form #142

timothymctim opened this issue Jul 17, 2023 · 2 comments

Comments

@timothymctim
Copy link

What version of @tailwindcss/forms are you using?

v0.5.4

What version of Node.js are you using?

v18.16.1

What browser are you using?

Firefox

What operating system are you using?

Windows

Reproduction repository

N/A

Describe your issue

Pull request #141 enabled tailwindcss/forms for every input, even if no type is specified. However, this makes it difficult to disable tailwindcss/forms for a specific form or input.

Before v0.5.4 one could just omit type from the input and you were all set. It would be great if one could disable tailwindcss/forms for a specific input, just like tailwindcss/typography allows one to disable prose with not-prose.

A workaround that works currently in (at least) Firefox is to write type="".

@adamwathan
Copy link
Member

Hey! Right now the best way to handle this would be to use class strategy documented here:

https://github.com/tailwindlabs/tailwindcss-forms#using-only-global-styles-or-only-classes

...or to simply grab the CSS generated using the previous version of the plugin and paste that directly into your project and remove this plugin (I'd honestly be more likely to take this route myself).

Making it possible to opt-out on a control by control basis is an interesting idea but not a goal right now — the level of complexity we've reached in the typography plugin is pretty regrettable. Sorry that this change breaks your expectations, I don't really want to revert it or anything though because there's never been a way to opt-out of styles for other form controls with the plugin like textarea or select so relying on input with no type to be unstyled doesn't feel consistent to me personally

@timothymctim
Copy link
Author

Makes sense! Thanks for the prompt handling of the issue and maintaining the project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants