tailwindcss-forms
A plugin that provides a basic reset for form styles that makes form elements easy to override with utilities.
by tailwindlabsHTML
Commit activity
Last 12 weeks · 0 commits
Community health
2 of 6 standards met
Recent PRs & issues
What version of @tailwindcss/forms are you using? v0.5.11 What version of Node.js are you using? v22.22.0 What browser are you using? Chrome, Firefox What operating system are you using? Fedora Reproduction repository https://play.tailwindcss.com/2lY3Z2TaqM Describe your issue I'm unable to set the background color of a checkbox or radio input. See the following example: https://play.tailwindcss.com/2lY3Z2TaqM When removing the class it does work. Also, in Tailwind V3 I didn't have this issue so I'm guessing it introduced with V4.
What version of @tailwindcss/forms are you using? v0.5.7 Describe your issue I read the discussion https://github.com/tailwindlabs/tailwindcss-forms/issues/22. The thread has been closed by adding strategy. Sorry to bring this up again However, the strategy is not easily overridable because it was placed later in the CSS file (at the components layer). No matter the strategy used, should always be a base, ready to be overridden by other stylings. Why the need for overrides? I can't talk for others, as you'll see some of them on the discussion links above, but for me, adds colors that almost always need overriding because they stand out like sore thumbs. What should we do? Can we move CSS declarations of strategy from layer to layer? Basically, modify the code here: https://github.com/tailwindlabs/tailwindcss-forms/blob/c9d9da3e010b194a1f0e9c36fbd98c83e4762840/src/index.js#L353 from to . Why do I, or other similar people, use at all? has its ecosystem, and some 3rd-party components expect to be there as the base. We still want to work with and the people creating those components, even if we are not a fan of the approaches.
What version of @tailwindcss/forms are you using? 0.3.3 What version of Node.js are you using? 14.15.4 What browser are you using? Chrome What operating system are you using? macOS Reproduction repository https://github.com/johnathanludwig/tailwind-forms-dark-mode Describe your issue In light mode you can style a checkbox by setting a background color for the base checkbox, and a text color for the version of the checkbox. With dark mode via the method, the background classes sets both the unchecked and checked color removing the ability to customize. The styling works properly when using for dark mode. Reproduction Steps: 1. Build tailwind using and enable dark mode using the method. 2. Add checkbox with a dark background color class and dark text color class. 3. Enable wrap the checkbox in a class. 4. Check the checkbox Expected Results The text color should be displayed when the checkbox is checked. Actual Results The background color is used for both checked and unchecked checkboxes.
Recent fixes
This updates the checkbox/radio examples to use when showing checked-state colors, and adds a short note for the + checked state case. The current examples show for checkbox color. With the custom appearance styles in this plugin, native utilities do not control the rendered checked background, and in Tailwind CSS v4 an unchecked can make that especially confusing. works for the checked background in both v3 and v4. Checked: Tailwind CSS v3.4.13 fixture build Tailwind CSS v4.3.0 fixture build Browser computed-style check on the v3/v4 fixtures through Related to #184.
Repository: tailwindlabs/tailwindcss-forms. Description: A plugin that provides a basic reset for form styles that makes form elements easy to override with utilities. Stars: 4558, Forks: 228. Primary language: HTML. Languages: HTML (57.1%), JavaScript (42.9%). License: MIT. Homepage: https://tailwindcss-forms.vercel.app Latest release: v0.5.11 (11mo ago). Open PRs: 0, open issues: 3. Last activity: 6mo ago. Community health: 37%. Top contributors: adamwathan, thecrypticace, RobinMalfait, reinink, chasegiunta, philipp-spiess, bradlc, hyunbinseo, simonswiss, saibotk and others.