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

Allow for <input> without type #140

Closed
wants to merge 2 commits into from
Closed

Allow for <input> without type #140

wants to merge 2 commits into from

Conversation

karlhorky
Copy link
Contributor

Allow for <input /> elements without the type attribute (eg. which defaults to a text input), which may be required by certain codebases:

<input /> <!-- same as input with type="text" -->

Also removed the note from the readme, which isn't required anymore if my approach works

@vercel
Copy link

vercel bot commented Jul 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tailwindcss-forms ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 13, 2023 0:35am

@adamwathan
Copy link
Member

Hey thanks! This solution won't work as :not([type]) will match just about every single element in your project. Every div, span, nav, header, etc. will all get the input styles.

Take a look at the deployment preview this PR creates for instance:

https://tailwindcss-forms-git-fork-karlhorky-patch-1-tailwindlabs.vercel.app/

So going to close this one, but if you want to contribute a different solution I'm happy to take a look, just make sure you actually test it 👍🏻

@adamwathan adamwathan closed this Jul 13, 2023
@karlhorky
Copy link
Contributor Author

karlhorky commented Jul 13, 2023

@adamwathan Ok, thanks for the note. I wanted to open a quick PR for feedback first (I assumed that all of these selectors were already scoped to input elements), but I guess just adding the input to the selector is the answer? New PR:

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

Successfully merging this pull request may close these issues.

None yet

2 participants